Skip to content

Commit

Permalink
Merge pull request #1331 from newapx/patch-1
Browse files Browse the repository at this point in the history
use jsdom-global: error HowlerGlobal is not defined
  • Loading branch information
goldfire authored May 10, 2020
2 parents 769ba5e + f29cd75 commit 7c331ec
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/howler.core.js
Original file line number Diff line number Diff line change
Expand Up @@ -2505,16 +2505,16 @@
exports.Howl = Howl;
}

// Define globally in case AMD is not available or unused.
if (typeof window !== 'undefined') {
window.HowlerGlobal = HowlerGlobal;
window.Howler = Howler;
window.Howl = Howl;
window.Sound = Sound;
} else if (typeof global !== 'undefined') { // Add to global in Node.js (for testing, etc).
// Add to global in Node.js (for testing, etc).
if (typeof global !== 'undefined') {
global.HowlerGlobal = HowlerGlobal;
global.Howler = Howler;
global.Howl = Howl;
global.Sound = Sound;
} else if (typeof window !== 'undefined') { // Define globally in case AMD is not available or unused.
window.HowlerGlobal = HowlerGlobal;
window.Howler = Howler;
window.Howl = Howl;
window.Sound = Sound;
}
})();

0 comments on commit 7c331ec

Please sign in to comment.