Skip to content

Commit

Permalink
Prevent error when ctx doesn't exist for iOS test
Browse files Browse the repository at this point in the history
  • Loading branch information
goldfire committed Jul 2, 2014
1 parent cddcf58 commit 5585a94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion howler.js
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@
}

// automatically try to enable audio on iOS
if (Howler.iOSAutoEnable) {
if (typeof ctx !== 'undefined' && Howler.iOSAutoEnable) {
Howler._enableiOSAudio();
}

Expand Down

0 comments on commit 5585a94

Please sign in to comment.