diff --git a/packages/ketcher-standalone/src/infrastructure/services/struct/standaloneStructService.ts b/packages/ketcher-standalone/src/infrastructure/services/struct/standaloneStructService.ts index cbc5d306c8..8fd98b34e4 100644 --- a/packages/ketcher-standalone/src/infrastructure/services/struct/standaloneStructService.ts +++ b/packages/ketcher-standalone/src/infrastructure/services/struct/standaloneStructService.ts @@ -222,7 +222,9 @@ class IndigoService implements StructService { this.worker = indigoWorker; this.worker.onmessage = (e: MessageEvent>) => { if (e.data.type === Command.Info) { - const callbackMethod = process.env.SEPARATE_INDIGO_RENDER + const isSeparateRender = + typeof process !== 'undefined' && process.env?.SEPARATE_INDIGO_RENDER; + const callbackMethod = isSeparateRender ? this.callIndigoNoRenderLoadedCallback : this.callIndigoLoadedCallback;