diff options
author | Fabio Berger <me@fabioberger.com> | 2017-11-29 06:06:09 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-29 06:06:09 +0800 |
commit | e71c7fdb16b3477e75c10d349ebeccab394ef9b1 (patch) | |
tree | 34cf4b44c4d70e10d55ea242e61b7ecce4e071d5 /packages/website/ts/lazy_component.tsx | |
parent | 840557be0dd8466aa6a49a8fa3e0ff8d1850f323 (diff) | |
parent | 4258e6dab18a7149d199bcbcb55b83a29f42bca0 (diff) | |
download | dexon-sol-tools-e71c7fdb16b3477e75c10d349ebeccab394ef9b1.tar dexon-sol-tools-e71c7fdb16b3477e75c10d349ebeccab394ef9b1.tar.gz dexon-sol-tools-e71c7fdb16b3477e75c10d349ebeccab394ef9b1.tar.bz2 dexon-sol-tools-e71c7fdb16b3477e75c10d349ebeccab394ef9b1.tar.lz dexon-sol-tools-e71c7fdb16b3477e75c10d349ebeccab394ef9b1.tar.xz dexon-sol-tools-e71c7fdb16b3477e75c10d349ebeccab394ef9b1.tar.zst dexon-sol-tools-e71c7fdb16b3477e75c10d349ebeccab394ef9b1.zip |
Merge pull request #243 from 0xProject/fix/refactorDocs
Refactor docs
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 ( |