1
0
Fork 1
mirror of https://example.com synced 2024-11-23 08:06:39 +09:00
This commit is contained in:
syuilo 2018-10-09 05:35:40 +09:00
parent 7f5a69f4d8
commit 3c38a867b4
No known key found for this signature in database
GPG key ID: BDC4C49D06AB9D69

View file

@ -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);