fix(stage.ts): add error logging to catch block in expandImage() and minimizeImage() functions for better error handling

This commit is contained in:
Sped0n
2023-11-02 12:28:30 +08:00
parent dd01dd8bec
commit 0cc97325c0

View File

@@ -145,9 +145,10 @@ function expandImage(): void {
ease: Power3.easeInOut ease: Power3.easeInOut
}) })
// finished // finished
// eslint-disable-next-line @typescript-eslint/no-floating-promises
tl.then(() => { tl.then(() => {
isAnimating.set(false) isAnimating.set(false)
}).catch((e) => {
console.log(e)
}) })
} }
@@ -185,9 +186,10 @@ export function minimizeImage(): void {
opacity: 1 opacity: 1
}) })
// finished // finished
// eslint-disable-next-line @typescript-eslint/no-floating-promises
tl.then(() => { tl.then(() => {
isAnimating.set(false) isAnimating.set(false)
}).catch((e) => {
console.log(e)
}) })
} }