Skip to content

Commit

Permalink
Fix Ember global deprecation
Browse files Browse the repository at this point in the history
A minimal fix for #600. We should probably follow through with the
refactor suggested by @rwjblue in #600 but that can be done later.
  • Loading branch information
chancancode committed Jun 2, 2021
1 parent 3e02036 commit c234847
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions assets/browser-fetch.js.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
(function (originalGlobal) {
define('fetch', ['exports'], function(exports) {
define('fetch', ['exports', 'ember'], function(exports, Ember) {
'use strict';
var Promise = originalGlobal.Ember.RSVP.Promise;
var Ember__default = 'default' in Ember ? Ember['default'] : Ember;
var Promise = Ember__default.RSVP.Promise;
var supportProps = [
'FormData',
'FileReader',
Expand Down Expand Up @@ -49,8 +50,8 @@
return result;
}

if (originalGlobal.Ember.Test) {
originalGlobal.Ember.Test.registerWaiter(function() {
if (Ember__default.Test) {
Ember__default.Test.registerWaiter(function() {
return pending === 0;
});

Expand Down

0 comments on commit c234847

Please sign in to comment.