aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website
diff options
context:
space:
mode:
authorfragosti <francesco.agosti93@gmail.com>2018-07-10 07:16:48 +0800
committerfragosti <francesco.agosti93@gmail.com>2018-07-10 07:16:48 +0800
commitee5ac6b800c16ad16fffe45c168df2a1434e7488 (patch)
treea05835576f97c7b6683436c1c3d60f4a208f344a /packages/website
parenta481d2ab46fcc5ef1a0b843f991ba66175eb12ed (diff)
downloaddexon-sol-tools-ee5ac6b800c16ad16fffe45c168df2a1434e7488.tar
dexon-sol-tools-ee5ac6b800c16ad16fffe45c168df2a1434e7488.tar.gz
dexon-sol-tools-ee5ac6b800c16ad16fffe45c168df2a1434e7488.tar.bz2
dexon-sol-tools-ee5ac6b800c16ad16fffe45c168df2a1434e7488.tar.lz
dexon-sol-tools-ee5ac6b800c16ad16fffe45c168df2a1434e7488.tar.xz
dexon-sol-tools-ee5ac6b800c16ad16fffe45c168df2a1434e7488.tar.zst
dexon-sol-tools-ee5ac6b800c16ad16fffe45c168df2a1434e7488.zip
Fix unsubscribe bug
Diffstat (limited to 'packages/website')
-rw-r--r--packages/website/ts/blockchain.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/website/ts/blockchain.ts b/packages/website/ts/blockchain.ts
index fde134b18..5476fcf37 100644
--- a/packages/website/ts/blockchain.ts
+++ b/packages/website/ts/blockchain.ts
@@ -537,7 +537,9 @@ export class Blockchain {
}
public destroy(): void {
this._blockchainWatcher.destroy();
- this._injectedProviderObservable.unsubscribe(this._injectedProviderUpdateHandler);
+ if (this._injectedProviderObservable) {
+ this._injectedProviderObservable.unsubscribe(this._injectedProviderUpdateHandler);
+ }
this._stopWatchingExchangeLogFillEvents();
this._stopWatchingGasPrice();
}