diff options
author | Fabio Berger <me@fabioberger.com> | 2017-11-29 05:11:04 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2017-11-29 05:11:04 +0800 |
commit | 72a00ac2df47ff793d74c2a82c7f403f501e784a (patch) | |
tree | 082d38d2ed5a36ec4b8f7e0bd156841ca86cf005 /packages/website/ts/lazy_component.tsx | |
parent | fcddd503b76283266946dc1f04b299d0606c90bb (diff) | |
download | dexon-sol-tools-72a00ac2df47ff793d74c2a82c7f403f501e784a.tar dexon-sol-tools-72a00ac2df47ff793d74c2a82c7f403f501e784a.tar.gz dexon-sol-tools-72a00ac2df47ff793d74c2a82c7f403f501e784a.tar.bz2 dexon-sol-tools-72a00ac2df47ff793d74c2a82c7f403f501e784a.tar.lz dexon-sol-tools-72a00ac2df47ff793d74c2a82c7f403f501e784a.tar.xz dexon-sol-tools-72a00ac2df47ff793d74c2a82c7f403f501e784a.tar.zst dexon-sol-tools-72a00ac2df47ff793d74c2a82c7f403f501e784a.zip |
Refactor the topLevel documentation react components for 0x.js and Smart contracts into a single component
Diffstat (limited to 'packages/website/ts/lazy_component.tsx')
-rw-r--r-- | packages/website/ts/lazy_component.tsx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/packages/website/ts/lazy_component.tsx b/packages/website/ts/lazy_component.tsx index 1dfe4db95..359a1fe65 100644 --- a/packages/website/ts/lazy_component.tsx +++ b/packages/website/ts/lazy_component.tsx @@ -56,6 +56,9 @@ export const createLazyComponent = (componentName: string, lazyImport: () => Pro const reactComponentPromise = (async (): Promise<React.ComponentClass<any>> => { const mod = await lazyImport(); const component = mod[componentName]; + if (_.isUndefined(component)) { + throw new Error(`Did not find exported component: ${componentName}`); + } return component; })(); return ( |