Fix a bug when undefined was been tried to convert to an array

This commit is contained in:
Leonid Logvinov
2018-11-13 19:27:44 +01:00
parent 3fb29041b0
commit 11f0bebd7f
2 changed files with 5 additions and 1 deletions

View File

@@ -5,6 +5,10 @@
{
"note": "Start jsonRpcRequestId at 1, not 0 as 0 breaks the web3.js websocket RPC provider",
"pr": 1227
},
{
"note":
"Fix the bug when order watcher was trying to convert undefined to an object in case of CancelUpTo event"
}
]
},

View File

@@ -50,7 +50,7 @@ export class DependentOrderHashesTracker {
return uniqueOrderHashList;
}
public getDependentOrderHashesByMaker(makerAddress: string): string[] {
const dependentOrderHashes = Array.from(this._orderHashesByMakerAddress[makerAddress]);
const dependentOrderHashes = Array.from(this._orderHashesByMakerAddress[makerAddress] || {});
return dependentOrderHashes;
}
public getDependentOrderHashesByAssetDataByMaker(makerAddress: string, assetData: string): string[] {