Skip to content

Commit 4a706f9

Browse files
committed
fix: preview put zoom on preview when content type or url changes
1 parent a4f5f3a commit 4a706f9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

custom/preview.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,8 @@ function guessContentType(url) {
141141
}
142142
143143
144-
watch([url, contentType], async ([url, contentType]) => {
144+
watch([contentType], async ([contentType]) => {
145+
// since content type might change after true guessing (HEAD request might be slow) we need to try initializing zoom again
145146
if (zoom.value) {
146147
zoom.value.detach();
147148
}

0 commit comments

Comments
 (0)