fix require for paths ending with .js in the worker

This commit is contained in:
nightwing 2015-03-10 20:14:36 +04:00
commit fe96eef206

View file

@ -69,7 +69,8 @@ window.require = function(parentId, id) {
if (!window.require.tlns)
return console.log("unable to load " + id);
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;
importScripts(path);