From ae661f72cdfa34c5bcfeacdb2017129b508d189b Mon Sep 17 00:00:00 2001 From: Rohan Date: Sun, 24 Jan 2021 03:32:15 +0530 Subject: [PATCH] Fixed removeListeners Fixed removeListeners was broken due to gid being returned as null inside cbGID --- lib/order.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/order.js b/lib/order.js index a3f30d6..388fbfb 100644 --- a/lib/order.js +++ b/lib/order.js @@ -423,8 +423,9 @@ class Order extends Model { * @param {WSv2|RESTv2} apiInterface - optional ws defaults to internal ws */ removeListeners (apiInterface = this._apiInterface) { + const cbGID = this.cbGID().replace('null','undefined'); if (apiInterface) { - apiInterface.removeListeners(this.cbGID()) + apiInterface.removeListeners(cbGID) } }