diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-10-09 05:35:40 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-10-09 05:35:40 +0900 |
| commit | 3c38a867b4eebec841459167dde57e23aa6b14c5 (patch) | |
| tree | 7d0da0fc30f1fd446279dcd4d8cb8a4f87947840 /src/client/app/common/scripts | |
| parent | Fix bug (diff) | |
| download | sharkey-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.ts | 6 |
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); |