Skip to content

Commit

Permalink
Return the loader promise for chaining
Browse files Browse the repository at this point in the history
  • Loading branch information
paulkaplan committed Mar 31, 2017
1 parent dff7f24 commit cc454f2
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,7 @@ AudioEngine.prototype.decodeSound = function (sound) {
}

var storedContext = this;

loaderPromise.then(
return loaderPromise.then(
function (decodedAudio) {
storedContext.audioBuffers[sound.md5] = new Tone.Buffer(decodedAudio);
},
Expand Down Expand Up @@ -319,4 +318,3 @@ AudioPlayer.prototype.setVolume = function (value) {
};

module.exports = AudioEngine;

0 comments on commit cc454f2

Please sign in to comment.