Adds a deprecation for $LAB usage in case plugins use it

Previously it was just removed which broke MathJax.
This commit is contained in:
Robin Ward 2015-03-11 10:59:34 -04:00
parent fb85d3c8a6
commit 5f3176dfd4
1 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,19 @@
import loadScript from 'discourse/lib/load-script';
export default {
name: 'lab-deprecation',
initialize() {
if (window.$LAB) { return; }
window.$LAB = {
script(path) {
Ember.warn('$LAB is not included with Discouse anymore. Use `loadScript` instead.');
const promise = loadScript(path);
promise.wait = promise.then;
return promise;
}
};
}
};