Skip to content

Commit a540323

Browse files
authored
fix: Avoid substitutions when Webpack was introduced
Avoid substitutions when Webpack was introduced #4476 from w89612b/patch-1
2 parents a78e127 + 0af8b48 commit a540323

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Diff for: lib/ace/worker/worker.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -153,10 +153,10 @@ window.define = function(id, deps, factory) {
153153
};
154154
};
155155
window.define.amd = {};
156-
require.tlns = {};
156+
window.require.tlns = {};
157157
window.initBaseUrls = function initBaseUrls(topLevelNamespaces) {
158158
for (var i in topLevelNamespaces)
159-
require.tlns[i] = topLevelNamespaces[i];
159+
this.require.tlns[i] = topLevelNamespaces[i];
160160
};
161161

162162
window.initSender = function initSender() {
@@ -210,8 +210,8 @@ window.onmessage = function(e) {
210210
else if (msg.init) {
211211
window.initBaseUrls(msg.tlns);
212212
sender = window.sender = window.initSender();
213-
var clazz = require(msg.module)[msg.classname];
213+
var clazz = this.require(msg.module)[msg.classname];
214214
main = window.main = new clazz(sender);
215215
}
216216
};
217-
})(this);
217+
})(this);

0 commit comments

Comments
 (0)