From 691edfcd5b7581844417669d3af92e84ea7099bf Mon Sep 17 00:00:00 2001 From: Juan Tejada Date: Wed, 11 May 2016 12:23:58 -0700 Subject: [PATCH] fix(query-subs): Fix `onLastCallbackRemoved` overriding with correct class syntax - Using arrow function syntax for a class method that is meant to be overriden will prevent it from being properly overriden - This caused onLastCallbackRemoved not to be called --- src/flux/models/query-subscription.es6 | 2 +- src/flux/models/unread-query-subscription.es6 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/flux/models/query-subscription.es6 b/src/flux/models/query-subscription.es6 index 5d34151aa..e040ca3c2 100644 --- a/src/flux/models/query-subscription.es6 +++ b/src/flux/models/query-subscription.es6 @@ -67,7 +67,7 @@ export default class QuerySubscription { } } - onLastCallbackRemoved = () => { + onLastCallbackRemoved() { } diff --git a/src/flux/models/unread-query-subscription.es6 b/src/flux/models/unread-query-subscription.es6 index 6d57730e7..a7b961269 100644 --- a/src/flux/models/unread-query-subscription.es6 +++ b/src/flux/models/unread-query-subscription.es6 @@ -42,7 +42,7 @@ export default class UnreadQuerySubscription extends MutableQuerySubscription { this._query = buildQuery(this._categoryIds).limit(limit).offset(offset); } - onLastCallbackRemoved = () => { + onLastCallbackRemoved() { this._unlisten(); } }