diff --git a/app/assets/javascripts/ember-production-deprecations/vendor/ember-production-deprecations/deprecate-shim.js b/app/assets/javascripts/ember-production-deprecations/vendor/ember-production-deprecations/deprecate-shim.js index 4cfd1d4e627..98cace57b31 100644 --- a/app/assets/javascripts/ember-production-deprecations/vendor/ember-production-deprecations/deprecate-shim.js +++ b/app/assets/javascripts/ember-production-deprecations/vendor/ember-production-deprecations/deprecate-shim.js @@ -35,27 +35,29 @@ define("discourse/lib/deprecate-shim", ["exports"], function (exports) { ); // Patch ember-global deprecation - Object.defineProperty(window, "Ember", { - enumerable: true, - configurable: true, - get() { - require("@ember/debug").deprecate( - "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", - url: "https://deprecations.emberjs.com/v3.x/#toc_ember-global", - for: "ember-source", - since: { - enabled: "3.27.0", - }, - } - ); + if (window.hasOwnProperty("Ember")) { + Object.defineProperty(window, "Ember", { + enumerable: true, + configurable: true, + get() { + require("@ember/debug").deprecate( + "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", + url: "https://deprecations.emberjs.com/v3.x/#toc_ember-global", + for: "ember-source", + since: { + enabled: "3.27.0", + }, + } + ); - return require("ember").default; - }, - }); + return require("ember").default; + }, + }); + } }; });