Skip to content

Commit 8cd9ec5

Browse files
committed
make sure we don't bust null URLs
1 parent 2bafc03 commit 8cd9ec5

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

resources/js/components/assets/Browser/Browser.vue

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1095,9 +1095,14 @@ export default {
10951095
}
10961096
10971097
if (nextStrategy === 'overwrite') {
1098-
const originalPreview = context.conflict?.existing?.preview;
1099-
const originalThumbnail = context.conflict?.existing?.thumbnail;
1100-
Statamic.$callbacks.call('bustAndReloadImageCaches', [originalPreview, originalThumbnail]);
1098+
const urls = [
1099+
context.conflict?.existing?.preview,
1100+
context.conflict?.existing?.thumbnail,
1101+
].filter(Boolean);
1102+
1103+
if (urls.length) {
1104+
Statamic.$callbacks.call('bustAndReloadImageCaches', urls);
1105+
}
11011106
}
11021107
}
11031108

0 commit comments

Comments
 (0)