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:
Robin Ward
2015-05-13 16:24:49 -04:00
parent 06643fb625
commit d90063fc59
321 changed files with 382 additions and 359 deletions

View File

@ -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);
}
}
};
}