diff options
author | fragosti <francesco.agosti93@gmail.com> | 2018-12-01 05:47:47 +0800 |
---|---|---|
committer | fragosti <francesco.agosti93@gmail.com> | 2018-12-01 05:47:47 +0800 |
commit | e47dd4a83ed52dd246beddeb93fc5de3378fae24 (patch) | |
tree | 119eb20728e8ea4ab3910cf389db121b366821aa | |
parent | 9ebe8d63c829ea4b6b1fbbdf7a132c7f9b8f56dc (diff) | |
download | dexon-0x-contracts-e47dd4a83ed52dd246beddeb93fc5de3378fae24.tar dexon-0x-contracts-e47dd4a83ed52dd246beddeb93fc5de3378fae24.tar.gz dexon-0x-contracts-e47dd4a83ed52dd246beddeb93fc5de3378fae24.tar.bz2 dexon-0x-contracts-e47dd4a83ed52dd246beddeb93fc5de3378fae24.tar.lz dexon-0x-contracts-e47dd4a83ed52dd246beddeb93fc5de3378fae24.tar.xz dexon-0x-contracts-e47dd4a83ed52dd246beddeb93fc5de3378fae24.tar.zst dexon-0x-contracts-e47dd4a83ed52dd246beddeb93fc5de3378fae24.zip |
chore: lint
-rw-r--r-- | packages/instant/src/components/standard_sliding_panel.tsx | 2 | ||||
-rw-r--r-- | packages/instant/src/index.umd.ts | 9 | ||||
-rw-r--r-- | packages/instant/src/redux/analytics_middleware.ts | 2 |
3 files changed, 6 insertions, 7 deletions
diff --git a/packages/instant/src/components/standard_sliding_panel.tsx b/packages/instant/src/components/standard_sliding_panel.tsx index f587ff79a..9f517d273 100644 --- a/packages/instant/src/components/standard_sliding_panel.tsx +++ b/packages/instant/src/components/standard_sliding_panel.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; -import { SlideAnimationState, StandardSlidingPanelContent, StandardSlidingPanelSettings } from '../types'; +import { StandardSlidingPanelContent, StandardSlidingPanelSettings } from '../types'; import { InstallWalletPanelContent } from './install_wallet_panel_content'; import { SlidingPanel } from './sliding_panel'; diff --git a/packages/instant/src/index.umd.ts b/packages/instant/src/index.umd.ts index 869b52353..3d7774858 100644 --- a/packages/instant/src/index.umd.ts +++ b/packages/instant/src/index.umd.ts @@ -89,11 +89,10 @@ export const render = (config: ZeroExInstantConfig, selector: string = DEFAULT_Z // If the integrator defined a popstate handler, save it to __zeroExInstantIntegratorsPopStateHandler // unless we have already done so on a previous render. const anyWindow = window as any; - if (window.onpopstate && !anyWindow.__zeroExInstantIntegratorsPopStateHandler) { - anyWindow.__zeroExInstantIntegratorsPopStateHandler = window.onpopstate.bind(window); - } else { - anyWindow.__zeroExInstantIntegratorsPopStateHandler = util.boundNoop; - } + const popStateExistsAndNotSetPreviously = window.onpopstate && !anyWindow.__zeroExInstantIntegratorsPopStateHandler; + anyWindow.__zeroExInstantIntegratorsPopStateHandler = popStateExistsAndNotSetPreviously + ? anyWindow.onpopstate.bind(window) + : util.boundNoop; const onPopStateHandler = (e: PopStateEvent) => { anyWindow.__zeroExInstantIntegratorsPopStateHandler(e); const newState = e.state; diff --git a/packages/instant/src/redux/analytics_middleware.ts b/packages/instant/src/redux/analytics_middleware.ts index 3dc5fe924..47876ca2d 100644 --- a/packages/instant/src/redux/analytics_middleware.ts +++ b/packages/instant/src/redux/analytics_middleware.ts @@ -3,7 +3,7 @@ import * as _ from 'lodash'; import { Middleware } from 'redux'; import { ETH_DECIMALS } from '../constants'; -import { Account, AccountState, StandardSlidingPanelContent } from '../types'; +import { AccountState, StandardSlidingPanelContent } from '../types'; import { analytics } from '../util/analytics'; import { Action, ActionTypes } from './actions'; |