Skip to content

Commit

Permalink
fix(loader-image): correct state update placement
Browse files Browse the repository at this point in the history
  • Loading branch information
dargmuesli committed Nov 22, 2022
1 parent 6e8b73e commit ddf7412
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/loader/LoaderImage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ function updateSource() {
img.onload = () => {
srcWhenLoaded.value = img.src
loadingIds.value.splice(loadingIds.value.indexOf(loadingId), 1)
}
img.src = props.src
}
// lifecycle
onMounted(() => loadingIds.value.splice(loadingIds.value.indexOf(loadingId), 1))
watch(
() => props.src,
(_currentValue, _oldValue) => {
Expand Down

0 comments on commit ddf7412

Please sign in to comment.