diff --git a/website/src/lib/calculatorModule.ts b/website/src/lib/calculatorModule.ts index dfd7dac..176a333 100644 --- a/website/src/lib/calculatorModule.ts +++ b/website/src/lib/calculatorModule.ts @@ -75,7 +75,8 @@ let Variables: VariableDefinition[] = []; export const getVariables = () => Variables; function getLoadingState(): Promise { - if (Module?.calculate) return Promise.resolve(); + if (typeof Module !== 'undefined' && Module?.calculate) + return Promise.resolve(); return new Promise((resolve) => { const onLoaded = async () => { // It takes a bit longer for the `calculate` routine to be ready than