FIX: Deprecations have to be ES5

This commit is contained in:
Robin Ward 2016-07-06 16:30:41 -04:00
parent d9d758aeeb
commit 748ce74653
1 changed files with 5 additions and 3 deletions

View File

@ -4,8 +4,10 @@
function deprecate(module, methods) {
const result = {};
methods.forEach(m => {
result[m] = () => Ember.warn(`Discourse.${module}.${m} is deprecated. Export a setup() function instead`);
methods.forEach(function(m) {
result[m] = function() {
Ember.warn("Discourse." + module + "." + m + " is deprecated. Export a setup() function instead");
};
});
Discourse[module] = result;