Return after checking for an error and add an explanatory comment

This commit is contained in:
Leonid Logvinov
2018-01-12 21:39:51 +01:00
parent 5b6f8d4c3f
commit 6a56f20928

View File

@@ -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) {