mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-06-22 21:08:12 +08:00
fix(client): only play scene when ready (#57893)
This commit is contained in:
parent
553fe950f8
commit
c603dabe3b
@ -127,7 +127,7 @@ export function Scene({
|
||||
// TODO: if we manage the playing state in another module, we should not
|
||||
// need the early return here. It should not be possible for this to be
|
||||
// called at all if the scene is already playing.
|
||||
if (isPlaying) return;
|
||||
if (isPlaying || !sceneIsReady) return;
|
||||
setIsPlaying(true);
|
||||
setShowDialogue(true);
|
||||
|
||||
@ -240,6 +240,7 @@ export function Scene({
|
||||
isPlaying,
|
||||
duration,
|
||||
sceneSubject,
|
||||
sceneIsReady,
|
||||
commands,
|
||||
audio,
|
||||
hasTimestamps,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user