-
-
Notifications
You must be signed in to change notification settings - Fork 598
Closed
Description
Getting an error when unsubscribing from a liveQuery. Uncaught (in promise) TypeError: _this2.resolve is not a function
. The strange thing is that the original code does not contain the faulty resolve, however the distribution code does. I have no clue as to how this can be
** Original code **
https://github.com/parse-community/Parse-SDK-JS/blob/master/src/LiveQuerySubscription.js
unsubscribe() {
return CoreManager.getLiveQueryController().getDefaultLiveQueryClient().then((liveQueryClient) => {
liveQueryClient.unsubscribe(this);
this.emit('close');
});
}
** Distribution code **
Found in npm_modules/parse/dist/parse.js
(0, _createClass3.default)(Subscription, [{
key: 'unsubscribe',
value: function () {
var _this2 = this;
return _CoreManager2.default.getLiveQueryController().getDefaultLiveQueryClient().then(function (liveQueryClient) {
liveQueryClient.unsubscribe(_this2);
_this2.emit('close');
_this2.resolve(); // <-- THIS IS THE FAULTY LINE OF CODE
});
}
}]);
Metadata
Metadata
Assignees
Labels
No labels