Fix syntax error in audio unlock function that broke the game
This commit is contained in:
1 parent
f7901ad59a
commit
68d6c7d735
1 file changed
+2
@@ -119,6 +119,8 @@ const SFX = (() => {
|
|||||||
if (ctx.state === 'suspended') ctx.resume();
|
if (ctx.state === 'suspended') ctx.resume();
|
||||||
return ctx;
|
return ctx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function unlock() {
|
||||||
if (!ctx) ctx = new (window.AudioContext || window.webkitAudioContext)();
|
if (!ctx) ctx = new (window.AudioContext || window.webkitAudioContext)();
|
||||||
if (ctx.state === 'suspended') ctx.resume().then(() => {});
|
if (ctx.state === 'suspended') ctx.resume().then(() => {});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user