diff options
author | fragosti <francesco.agosti93@gmail.com> | 2018-07-10 07:16:48 +0800 |
---|---|---|
committer | fragosti <francesco.agosti93@gmail.com> | 2018-07-10 07:16:48 +0800 |
commit | ee5ac6b800c16ad16fffe45c168df2a1434e7488 (patch) | |
tree | a05835576f97c7b6683436c1c3d60f4a208f344a /packages/website/ts | |
parent | a481d2ab46fcc5ef1a0b843f991ba66175eb12ed (diff) | |
download | dexon-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/ts')
-rw-r--r-- | packages/website/ts/blockchain.ts | 4 |
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(); } |