From 6a56f209289105d7641c547a702469cbc9259029 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Fri, 12 Jan 2018 21:39:51 +0100 Subject: Return after checking for an error and add an explanatory comment --- packages/0x.js/src/order_watcher/order_state_watcher.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/0x.js/src/order_watcher/order_state_watcher.ts b/packages/0x.js/src/order_watcher/order_state_watcher.ts index 3543480f8..12ac60960 100644 --- a/packages/0x.js/src/order_watcher/order_state_watcher.ts +++ b/packages/0x.js/src/order_watcher/order_state_watcher.ts @@ -221,8 +221,9 @@ export class OrderStateWatcher { this._callbackIfExists(err); this.unsubscribe(); } + return; } - const log = logIfExists as LogEvent; + const log = logIfExists as LogEvent; // At this moment we are sure that no error occured and log is defined. const maybeDecodedLog = this._abiDecoder.tryToDecodeLogOrNoop(log); const isLogDecoded = !_.isUndefined((maybeDecodedLog as LogWithDecodedArgs).event); if (!isLogDecoded) { -- cgit v1.2.3