We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9affa78 commit b63e104Copy full SHA for b63e104
src/features/game/sound/GameSoundManager.ts
@@ -187,13 +187,9 @@ class GameSoundManager {
187
duration: fadeDuration
188
});
189
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);
+ // TODO: fix `TypeError: Cannot read property 'disconnect' of null` error
+ // when user navigates away from game scene before fadeDuration * 2
+ setTimeout(() => sound.destroy(), fadeDuration * 2);
197
}
198
199
/**
0 commit comments