From 90a3137ed283dbea159af43bc22fc0c52f1e8e08 Mon Sep 17 00:00:00 2001 From: tamaina Date: Wed, 17 May 2023 07:01:29 +0000 Subject: [PATCH] refactor --- packages/frontend/src/components/MkImgWithBlurhash.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/frontend/src/components/MkImgWithBlurhash.vue b/packages/frontend/src/components/MkImgWithBlurhash.vue index 875ae2e8fc..ca912fabf5 100644 --- a/packages/frontend/src/components/MkImgWithBlurhash.vue +++ b/packages/frontend/src/components/MkImgWithBlurhash.vue @@ -91,10 +91,6 @@ function waitForDecode() { } } -watch(() => props.src, () => { - waitForDecode(); -}); - watch([() => props.width, () => props.height, root], () => { const ratio = props.width / props.height; if (ratio > 1) { @@ -140,6 +136,10 @@ async function draw(transfer: boolean = false) { } } +watch(() => props.src, () => { + waitForDecode(); +}); + watch(() => props.hash, () => { draw(); });