discourse/app/assets/javascripts/discourse/initializers/lab-deprecation.js.es6
Robin Ward 5f3176dfd4 Adds a deprecation for $LAB usage in case plugins use it
Previously it was just removed which broke MathJax.
2015-03-11 10:59:34 -04:00

19 lines
409 B
JavaScript

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