diff --git a/web/src/app/webview/src/debug-main.ts b/web/src/app/webview/src/debug-main.ts index 7e4d026204..02a47101a6 100644 --- a/web/src/app/webview/src/debug-main.ts +++ b/web/src/app/webview/src/debug-main.ts @@ -10,6 +10,6 @@ import { SourcemappedWorker } from '@keymanapp/lexical-model-layer/web' */ const scripts = document.getElementsByTagName('script'); const ss = scripts[scripts.length-1].src; -const sPath = ss.slice(0,ss.lastIndexOf('/')); +const sPath = ss.substring(0,ss.lastIndexOf('/')+1); window['keyman'] = new KeymanEngine(SourcemappedWorker.constructInstance(), sPath); \ No newline at end of file diff --git a/web/src/app/webview/src/release-main.ts b/web/src/app/webview/src/release-main.ts index 3758b887d8..033adc846f 100644 --- a/web/src/app/webview/src/release-main.ts +++ b/web/src/app/webview/src/release-main.ts @@ -10,6 +10,6 @@ import { Worker } from '@keymanapp/lexical-model-layer/web' */ const scripts = document.getElementsByTagName('script'); const ss = scripts[scripts.length-1].src; -const sPath = ss.slice(0,ss.lastIndexOf('/')); +const sPath = ss.substring(0,ss.lastIndexOf('/')+1); window['keyman'] = new KeymanEngine(Worker.constructInstance(), sPath); \ No newline at end of file