Skip to content

Commit 33d1d2f

Browse files
committed
Fix case where Sound is constructed but audio engine is not available
1 parent 7375134 commit 33d1d2f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/dev/core/src/Audio/sound.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,11 @@ export class Sound {
283283

284284
let streaming = options?.streaming || false;
285285

286+
const audioEngine = AbstractEngine.audioEngine;
287+
if (!audioEngine) {
288+
return;
289+
}
290+
286291
const audioEngineV2 = (AbstractEngine.audioEngine as AudioEngine)._v2;
287292

288293
const createSoundV2 = () => {

0 commit comments

Comments
 (0)