Skip to content

Commit

Permalink
fix import error + use ES Promise instead of RSVP
Browse files Browse the repository at this point in the history
  • Loading branch information
karlicoss committed Nov 5, 2020
1 parent f8ea6e9 commit 6b3e56f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/basket.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
};

var getUrl = function( url ) {
var promise = new RSVP.Promise( function( resolve, reject ){
var promise = new Promise( function( resolve, reject ){

var xhr = new XMLHttpRequest();
xhr.open( 'GET', url );
Expand Down Expand Up @@ -143,7 +143,7 @@
} else {
source.type = obj.type || source.originalType;
source.execute = obj.execute;
promise = new RSVP.Promise( function( resolve ){
promise = new Promise( function( resolve ){
resolve( source );
});
}
Expand Down Expand Up @@ -189,7 +189,7 @@
promises.push( handleStackObject( arguments[ i ] ) );
}

return RSVP.all( promises );
return Promise.all( promises );
};

var thenRequire = function() {
Expand All @@ -201,7 +201,7 @@
return promise;
};

window.basket = {
var basket = window.basket = {
require: function() {
for ( var a = 0, l = arguments.length; a < l; a++ ) {
arguments[a].execute = arguments[a].execute !== false;
Expand Down

0 comments on commit 6b3e56f

Please sign in to comment.