From 252cd9f05905a180322ee300dd1fd5bc4d166aa7 Mon Sep 17 00:00:00 2001 From: Godfrey Chan Date: Tue, 1 Jun 2021 13:54:31 -0700 Subject: [PATCH] Fix Ember global deprecation A minimal fix for #600. We should probably follow through with the refactor suggested by @rwjblue in #600 but that can be done later. --- assets/browser-fetch.js.t | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/assets/browser-fetch.js.t b/assets/browser-fetch.js.t index 8d8cfe76..bf8229a9 100644 --- a/assets/browser-fetch.js.t +++ b/assets/browser-fetch.js.t @@ -1,7 +1,7 @@ (function (originalGlobal) { - define('fetch', ['exports'], function(exports) { + define('fetch', ['ember', 'exports'], function(Ember, exports) { 'use strict'; - var Promise = originalGlobal.Ember.RSVP.Promise; + var Promise = Ember.RSVP.Promise; var supportProps = [ 'FormData', 'FileReader', @@ -49,8 +49,8 @@ return result; } - if (originalGlobal.Ember.Test) { - originalGlobal.Ember.Test.registerWaiter(function() { + if (Ember.Test) { + Ember.Test.registerWaiter(function() { return pending === 0; });