mirror of
https://github.com/discourse/discourse.git
synced 2025-05-24 14:12:10 +08:00
FIX: Error with ace editor and new ember.
Fix upgrades ace editor, which was a huge headache due to AMD.
This commit is contained in:
@ -7,12 +7,16 @@ function loadWithTag(path, cb) {
|
||||
|
||||
let s = document.createElement('script');
|
||||
s.src = path;
|
||||
if (Ember.Test) { Ember.Test.pendingAjaxRequests++; }
|
||||
head.appendChild(s);
|
||||
|
||||
s.onload = s.onreadystatechange = function(_, abort) {
|
||||
if (Ember.Test) { Ember.Test.pendingAjaxRequests--; }
|
||||
if (abort || !s.readyState || s.readyState === "loaded" || s.readyState === "complete") {
|
||||
s = s.onload = s.onreadystatechange = null;
|
||||
if (!abort) { cb(); }
|
||||
if (!abort) {
|
||||
Ember.run(null, cb);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user