Skip to content

Commit b63e104

Browse files
committed
Replace hacky fix with a TODO
1 parent 9affa78 commit b63e104

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/features/game/sound/GameSoundManager.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -187,13 +187,9 @@ class GameSoundManager {
187187
duration: fadeDuration
188188
});
189189

190-
const befScene = this.getCurrentScene().scene.key;
191-
setTimeout(() => {
192-
const aftScene = this.getCurrentScene().scene.key;
193-
if (this.getBaseSoundManager().game && befScene === aftScene) {
194-
sound.destroy();
195-
}
196-
}, fadeDuration * 2);
190+
// TODO: fix `TypeError: Cannot read property 'disconnect' of null` error
191+
// when user navigates away from game scene before fadeDuration * 2
192+
setTimeout(() => sound.destroy(), fadeDuration * 2);
197193
}
198194

199195
/**

0 commit comments

Comments
 (0)