Check if body exists. Fix #3649.

This commit is contained in:
Richard Davey 2018-05-09 13:45:47 +01:00
parent 4106f7e899
commit 39cf7252c9

View file

@ -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);
}
},
/**