DEV: Only add ember-global deprecation for Ember 3 (#24667)
(otherwise, we're accidentally extending support into Ember 5!)
Followup to 106c1c317f
This commit is contained in:
parent
f8bf4bda00
commit
9f9c82ea97
|
@ -35,27 +35,29 @@ define("discourse/lib/deprecate-shim", ["exports"], function (exports) {
|
||||||
);
|
);
|
||||||
|
|
||||||
// Patch ember-global deprecation
|
// Patch ember-global deprecation
|
||||||
Object.defineProperty(window, "Ember", {
|
if (window.hasOwnProperty("Ember")) {
|
||||||
enumerable: true,
|
Object.defineProperty(window, "Ember", {
|
||||||
configurable: true,
|
enumerable: true,
|
||||||
get() {
|
configurable: true,
|
||||||
require("@ember/debug").deprecate(
|
get() {
|
||||||
"Usage of the Ember Global is deprecated. You should import the Ember module or the specific API instead.",
|
require("@ember/debug").deprecate(
|
||||||
false,
|
"Usage of the Ember Global is deprecated. You should import the Ember module or the specific API instead.",
|
||||||
{
|
false,
|
||||||
id: "ember-global",
|
{
|
||||||
until: "4.0.0",
|
id: "ember-global",
|
||||||
url: "https://deprecations.emberjs.com/v3.x/#toc_ember-global",
|
until: "4.0.0",
|
||||||
for: "ember-source",
|
url: "https://deprecations.emberjs.com/v3.x/#toc_ember-global",
|
||||||
since: {
|
for: "ember-source",
|
||||||
enabled: "3.27.0",
|
since: {
|
||||||
},
|
enabled: "3.27.0",
|
||||||
}
|
},
|
||||||
);
|
}
|
||||||
|
);
|
||||||
|
|
||||||
return require("ember").default;
|
return require("ember").default;
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue