aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/index.umd.ts
diff options
context:
space:
mode:
authorfragosti <francesco.agosti93@gmail.com>2018-11-22 00:42:07 +0800
committerfragosti <francesco.agosti93@gmail.com>2018-11-22 00:42:07 +0800
commite0beb7fb380e50e4566db4787092f5549a2d6db1 (patch)
tree46bb846dc46269499f361e43e4944b04c8e78d85 /packages/instant/src/index.umd.ts
parentfc123871ad9b1e791b8156d069c503e8d869139c (diff)
downloaddexon-0x-contracts-e0beb7fb380e50e4566db4787092f5549a2d6db1.tar.gz
dexon-0x-contracts-e0beb7fb380e50e4566db4787092f5549a2d6db1.tar.zst
dexon-0x-contracts-e0beb7fb380e50e4566db4787092f5549a2d6db1.zip
feat: add more to instant dev env
Diffstat (limited to 'packages/instant/src/index.umd.ts')
-rw-r--r--packages/instant/src/index.umd.ts7
1 files changed, 3 insertions, 4 deletions
diff --git a/packages/instant/src/index.umd.ts b/packages/instant/src/index.umd.ts
index 59f658b33..1d62084b5 100644
--- a/packages/instant/src/index.umd.ts
+++ b/packages/instant/src/index.umd.ts
@@ -7,6 +7,7 @@ import { ZeroExInstantOverlay, ZeroExInstantOverlayProps } from './index';
import { assert } from './util/assert';
import { util } from './util/util';
+const isInstantRendered = (): boolean => !!document.getElementById(INJECTED_DIV_ID);
export interface ZeroExInstantConfig extends ZeroExInstantOverlayProps {
shouldDisablePushToHistory?: boolean;
}
@@ -43,8 +44,8 @@ export const render = (config: ZeroExInstantConfig, selector: string = DEFAULT_Z
if (!_.isUndefined(config.shouldDisablePushToHistory)) {
assert.isBoolean('shouldDisablePushToHistory', config.shouldDisablePushToHistory);
}
- if (!_.isUndefined(props.shouldDisableAnalyticsTracking)) {
- assert.isBoolean('props.shouldDisableAnalyticsTracking', props.shouldDisableAnalyticsTracking);
+ if (!_.isUndefined(config.shouldDisableAnalyticsTracking)) {
+ assert.isBoolean('shouldDisableAnalyticsTracking', config.shouldDisableAnalyticsTracking);
}
assert.isString('selector', selector);
// Render instant and return a callback that allows you to remove it from the DOM.
@@ -101,5 +102,3 @@ export const render = (config: ZeroExInstantConfig, selector: string = DEFAULT_Z
};
}
};
-
-const isInstantRendered = (): boolean => !!document.getElementById(INJECTED_DIV_ID);