From 9227f1d531277906b781e76208d4c2d2e403c71e Mon Sep 17 00:00:00 2001 From: sambaneko Date: Tue, 10 Oct 2023 20:49:29 -0700 Subject: [PATCH] provide default value for w.size in getWPixelSize --- packages/webamp/js/selectors.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/webamp/js/selectors.ts b/packages/webamp/js/selectors.ts index 1b6ebebc34..13ad11dc2e 100644 --- a/packages/webamp/js/selectors.ts +++ b/packages/webamp/js/selectors.ts @@ -430,7 +430,7 @@ const WINDOW_HEIGHT = 116; const SHADE_WINDOW_HEIGHT = 14; function getWPixelSize(w: WebampWindow, doubled: boolean) { - const [width, height] = w.size; + const [width, height] = w.size ? w.size : [0,0]; const doubledMultiplier = doubled && w.canDouble ? 2 : 1; const pix = { height: WINDOW_HEIGHT + height * WINDOW_RESIZE_SEGMENT_HEIGHT,