mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-09 10:25:32 +00:00
refactor(web): use substring instead of slice
This addresses code review comments which recommended to use `substring` as this makes it more consistent with the rest of our code base.
This commit is contained in:
parent
3ee8359f8f
commit
93eabd96ab
2 changed files with 2 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
@ -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);
|
||||
Loading…
Add table
Reference in a new issue