*Add more safety checks on window

This commit is contained in:
Derrick Hammer 2022-07-20 17:23:48 -04:00
parent 648951208c
commit 200221e742
1 changed files with 5 additions and 5 deletions

View File

@ -15,12 +15,12 @@ const DHT_MODULE = "AQD1IgE4lTZkq1fqdoYGojKRNrSk0YQ_wrHbRtIiHDrnow";
let callModule: typeof callModuleModule,
connectModule: typeof connectModuleModule;
if (window.document) {
callModule = callModuleKernel;
connectModule = connectModuleKernel;
if (typeof window !== "undefined" && window?.document) {
callModule = callModuleKernel;
connectModule = connectModuleKernel;
} else {
callModule = callModuleModule;
connectModule = connectModuleModule;
callModule = callModuleModule;
connectModule = connectModuleModule;
}
export class DHT {