Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use jsdom-global: error HowlerGlobal is not defined #1331

Merged
merged 1 commit into from
May 10, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
}
})();