fix(showcase): fixed dispose for error route

This commit is contained in:
Haoyu Xu
2024-08-16 18:37:09 +08:00
parent c55fb39494
commit 9e1245cc0d

View File

@@ -146,7 +146,12 @@ export default function Error() {
}
}))
}
}, [playVoice, spineData]);
return () => {
if (spinePlayer) {
spinePlayer.dispose()
}
}
}, [playVoice, spineData, spinePlayer]);
return (
<section className={classes.error}>