Fix webOS destructuring incompatibility

This commit is contained in:
Bill Thornton
2025-07-09 12:36:44 -04:00
parent 6b7ac54d06
commit 5b953440a3
+2 -1
View File
@@ -155,7 +155,8 @@ function clearWindowSize() {
*/
export function getWindowSize() {
if (!windowSize) {
const { innerWidth, innerHeight } = window;
const innerWidth = window.innerWidth;
const innerHeight = window.innerHeight;
// NOTE: webOS has a bug that reports window size as infinite on page load, so we use a fallback size of 4K
if (!Number.isFinite(innerWidth) || !Number.isFinite(innerHeight)) {