Skip to content

Commit 92cec5b

Browse files
authored
Add extra fallback for nullish entries
1 parent 0d94f5f commit 92cec5b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

resources/views/partials/head.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script>
22
window.responsiveResizeObserver = new ResizeObserver(async (entries) => {
33
entries.forEach(entry => {
4-
let imgWidth = entry?.devicePixelContentBoxSize?.[0]?.inlineSize || (entry.borderBoxSize[0]?.inlineSize * window.devicePixelRatio);
4+
let imgWidth = entry?.devicePixelContentBoxSize?.[0]?.inlineSize || (entry?.borderBoxSize[0]?.inlineSize * window.devicePixelRatio) || 0;
55
66
if (imgWidth === 0) {
77
return;

0 commit comments

Comments
 (0)