mirror of
https://github.com/photonstorm/phaser
synced 2024-11-23 13:13:43 +00:00
Check if body exists. Fix #3649.
This commit is contained in:
parent
4106f7e899
commit
39cf7252c9
1 changed files with 6 additions and 3 deletions
|
@ -156,9 +156,12 @@ var WebAudioSoundManager = new Class({
|
|||
});
|
||||
};
|
||||
|
||||
document.body.addEventListener('touchstart', unlock, false);
|
||||
document.body.addEventListener('touchend', unlock, false);
|
||||
document.body.addEventListener('click', unlock, false);
|
||||
if (document.body)
|
||||
{
|
||||
document.body.addEventListener('touchstart', unlock, false);
|
||||
document.body.addEventListener('touchend', unlock, false);
|
||||
document.body.addEventListener('click', unlock, false);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue