Skip to content

Commit

Permalink
close always returns a Promise
Browse files Browse the repository at this point in the history
  • Loading branch information
tambien committed Dec 30, 2017
1 parent 1084039 commit 56aa333
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Tone/shim/AudioContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ define(["Tone/core/Tone", "Tone/shim/OfflineAudioContext"], function(Tone){
if (!AudioContext.prototype.close){
AudioContext.prototype.close = function(){
if (Tone.isFunction(this.suspend)) {
return this.suspend();
} else {
return Promise.resolve();
this.suspend();
}
return Promise.resolve();
};
}

Expand Down

0 comments on commit 56aa333

Please sign in to comment.