summaryrefslogtreecommitdiff
path: root/src/client/app/common/scripts
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-10-09 05:35:40 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-10-09 05:35:40 +0900
commit3c38a867b4eebec841459167dde57e23aa6b14c5 (patch)
tree7d0da0fc30f1fd446279dcd4d8cb8a4f87947840 /src/client/app/common/scripts
parentFix bug (diff)
downloadsharkey-3c38a867b4eebec841459167dde57e23aa6b14c5.tar.gz
sharkey-3c38a867b4eebec841459167dde57e23aa6b14c5.tar.bz2
sharkey-3c38a867b4eebec841459167dde57e23aa6b14c5.zip
Fix bug
Diffstat (limited to 'src/client/app/common/scripts')
-rw-r--r--src/client/app/common/scripts/note-subscriber.ts6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/client/app/common/scripts/note-subscriber.ts b/src/client/app/common/scripts/note-subscriber.ts
index 9a9a3c1198..1a82dd3918 100644
--- a/src/client/app/common/scripts/note-subscriber.ts
+++ b/src/client/app/common/scripts/note-subscriber.ts
@@ -91,7 +91,11 @@ export default prop => ({
Vue.set(this.$_ns_target, 'reactionCounts', {});
}
- this.$_ns_target.reactionCounts[reaction] = (this.$_ns_target.reactionCounts[reaction] || 0) + 1;
+ if (this.$_ns_target.reactionCounts[reaction] == null) {
+ Vue.set(this.$_ns_target.reactionCounts, reaction, 0);
+ }
+
+ this.$_ns_target.reactionCounts[reaction]++;
if (body.userId == this.$store.state.i.id) {
Vue.set(this.$_ns_target, 'myReaction', reaction);