aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2018-01-13 04:39:51 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2018-01-13 04:39:51 +0800
commit6a56f209289105d7641c547a702469cbc9259029 (patch)
treebd1d2c6a7858eb3eeb6f4a7103646753e89261d0
parent5b6f8d4c3fa8dfea455b8f29a52b0242c26d1101 (diff)
downloaddexon-sol-tools-6a56f209289105d7641c547a702469cbc9259029.tar.gz
dexon-sol-tools-6a56f209289105d7641c547a702469cbc9259029.tar.zst
dexon-sol-tools-6a56f209289105d7641c547a702469cbc9259029.zip
Return after checking for an error and add an explanatory comment
-rw-r--r--packages/0x.js/src/order_watcher/order_state_watcher.ts3
1 files changed, 2 insertions, 1 deletions
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<any>).event);
if (!isLogDecoded) {