fix require for paths ending with .js in the worker

This commit is contained in:
nightwing 2015-03-10 20:14:36 +04:00
parent 60680beae5
commit 1da498156a

View File

@ -71,7 +71,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;
window.require.modules[id] = {}; // prevent infinite loop on broken modules