From 3c38a867b4eebec841459167dde57e23aa6b14c5 Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 9 Oct 2018 05:35:40 +0900 Subject: [PATCH] Fix bug --- src/client/app/common/scripts/note-subscriber.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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);