Skip to content

Commit

Permalink
fix: Avoid substitutions when Webpack was introduced
Browse files Browse the repository at this point in the history
Avoid substitutions when Webpack was introduced

#4476 from w89612b/patch-1
  • Loading branch information
andrewnester committed Jun 28, 2022
2 parents a78e127 + 0af8b48 commit a540323
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/ace/worker/worker.js
Expand Up @@ -153,10 +153,10 @@ window.define = function(id, deps, factory) {
};
};
window.define.amd = {};
require.tlns = {};
window.require.tlns = {};
window.initBaseUrls = function initBaseUrls(topLevelNamespaces) {
for (var i in topLevelNamespaces)
require.tlns[i] = topLevelNamespaces[i];
this.require.tlns[i] = topLevelNamespaces[i];
};

window.initSender = function initSender() {
Expand Down Expand Up @@ -210,8 +210,8 @@ window.onmessage = function(e) {
else if (msg.init) {
window.initBaseUrls(msg.tlns);
sender = window.sender = window.initSender();
var clazz = require(msg.module)[msg.classname];
var clazz = this.require(msg.module)[msg.classname];
main = window.main = new clazz(sender);
}
};
})(this);
})(this);

0 comments on commit a540323

Please sign in to comment.