From 62fb31b68e78e9113a380fdf956b8ebe1ddf5c15 Mon Sep 17 00:00:00 2001 From: Morgan McMillian Date: Wed, 28 Jun 2017 20:20:14 -0700 Subject: [PATCH] fix error when checking for mentions of self, and tweak the color again --- src/pages/stream/stream.ts | 10 ++++++---- src/theme/variables.scss | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/pages/stream/stream.ts b/src/pages/stream/stream.ts index ae34fe3..094c752 100644 --- a/src/pages/stream/stream.ts +++ b/src/pages/stream/stream.ts @@ -145,10 +145,12 @@ export class StreamPage { } // res.data[i]['reposted_by_string'] = "Reposted by: " + reposted_by_string; } - for (var j = 0; j < res.data[i]['content']['entities']['mentions'].length; j++) { - var men = res.data[i]['content']['entities']['mentions'][j]['text']; - if (this.myUsername === men) { - res.data[i]['you_are_mentioned'] = true; + if (res.data[i].content) { + for (var j = 0; j < res.data[i]['content']['entities']['mentions'].length; j++) { + var men = res.data[i]['content']['entities']['mentions'][j]['text']; + if (this.myUsername === men) { + res.data[i]['you_are_mentioned'] = true; + } } } } diff --git a/src/theme/variables.scss b/src/theme/variables.scss index 86df848..496422a 100644 --- a/src/theme/variables.scss +++ b/src/theme/variables.scss @@ -29,7 +29,7 @@ $colors: ( danger: #f53d3d, light: #f4f4f4, dark: #222, - mention: #f4f4f4 + mention: #fffde7 );