From 1e1172e86c3d76d418f3da08b4fde69cde09eebe Mon Sep 17 00:00:00 2001 From: emizzle Date: Mon, 6 Jan 2020 14:41:45 +1100 Subject: [PATCH] fix(@embark/debugger): Prevent error if contract not tracked by Embark Null check to prevent an error during automated debugging for failed transactions. --- packages/plugins/debugger/src/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/plugins/debugger/src/index.ts b/packages/plugins/debugger/src/index.ts index 4bb9b7ab8..c41f0ed76 100644 --- a/packages/plugins/debugger/src/index.ts +++ b/packages/plugins/debugger/src/index.ts @@ -48,6 +48,7 @@ export default class TransactionDebugger { private listenToEvents() { this.embark.events.on('blockchain:tx', (tx: any) => { this.embark.events.request('contracts:contract', tx.name, (contract: any) => { + if (!(contract && contract.filename)) { return; } this.txTracker[tx.transactionHash] = {tx, contract}; this.lastTx = tx.transactionHash; if (tx.status !== '0x0') { return; }