diff --git a/src/ui/HOC.tsx b/src/ui/HOC.tsx index 3a161a48..d5703f5c 100644 --- a/src/ui/HOC.tsx +++ b/src/ui/HOC.tsx @@ -73,7 +73,7 @@ export function lazy(importer: LazyImport): React.FC { if (process.env.NODE_ENV !== 'production') { // lazy is not hot-reloadable - if ((module as any).hot) { + if (typeof module !== 'undefined' && (module as any)?.hot) { return loader(importer, { async: true }); } }