From fe96eef206b15b88f6bd8d6364b3980ede970472 Mon Sep 17 00:00:00 2001 From: nightwing Date: Tue, 10 Mar 2015 20:14:36 +0400 Subject: [PATCH] fix require for paths ending with .js in the worker --- lib/ace/worker/worker.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ace/worker/worker.js b/lib/ace/worker/worker.js index 928000dd..7a047584 100644 --- a/lib/ace/worker/worker.js +++ b/lib/ace/worker/worker.js @@ -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);