Skip to content
This repository has been archived by the owner on Jun 27, 2024. It is now read-only.

Commit

Permalink
#289 fix a bug on load brainbrowser worker on desktop. (#22)
Browse files Browse the repository at this point in the history
#289 fix a bug on load brainbrowser worker on desktop.
  • Loading branch information
hli-ng authored Jan 20, 2020
2 parents 98a9a6f + 71aab77 commit 614fee0
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/brainbrowser/lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,9 @@
let import_url = document.location.origin;
if (protocal === 'file:') {
let href = document.location.href;
if (href.endsWith('/')) {
href = href.substring(0, href.lastIndexOf('/'));
}
href = href.substring(0, href.lastIndexOf('/') + 1);
const regex = /^.*resources\/app\.asar\/dist\//;
const matchResult = href.match(regex);
href = matchResult && matchResult.length > 0 && matchResult[0] ? matchResult[0] : href;
import_url = href + worker_dir;
} else {
if (!import_url.endsWith('/') && worker_dir[0] !== '/') {
Expand Down

0 comments on commit 614fee0

Please sign in to comment.