From 3f39b22a680958988fbd7a8382dcd8d26420307f Mon Sep 17 00:00:00 2001 From: Jacob Evans Date: Tue, 14 Nov 2017 21:20:31 -0500 Subject: separate assignment and call --- packages/0x.js/src/contract_wrappers/contract_wrapper.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/0x.js/src/contract_wrappers/contract_wrapper.ts b/packages/0x.js/src/contract_wrappers/contract_wrapper.ts index bd65c8eb3..7997b1647 100644 --- a/packages/0x.js/src/contract_wrappers/contract_wrapper.ts +++ b/packages/0x.js/src/contract_wrappers/contract_wrapper.ts @@ -52,7 +52,8 @@ export class ContractWrapper { throw new Error(ZeroExError.SubscriptionNotFound); } if (!_.isUndefined(err)) { - this._filterCallbacks[filterToken](err, undefined); + const callback = this._filterCallbacks[filterToken]; + callback(err, undefined); } delete this._filters[filterToken]; delete this._filterCallbacks[filterToken]; -- cgit