fix require for paths ending with .js in the worker
This commit is contained in:
parent
0a3b002e28
commit
fe96eef206
1 changed files with 2 additions and 1 deletions
|
|
@ -69,7 +69,8 @@ window.require = function(parentId, id) {
|
||||||
if (!window.require.tlns)
|
if (!window.require.tlns)
|
||||||
return console.log("unable to load " + id);
|
return console.log("unable to load " + id);
|
||||||
chunks[0] = window.require.tlns[chunks[0]] || chunks[0];
|
chunks[0] = window.require.tlns[chunks[0]] || chunks[0];
|
||||||
var path = chunks.join("/") + ".js";
|
var path = chunks.join("/");
|
||||||
|
if (path.slice(-3) != ".js") path += ".js";
|
||||||
|
|
||||||
window.require.id = id;
|
window.require.id = id;
|
||||||
importScripts(path);
|
importScripts(path);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue