Skip to content

Commit

Permalink
provide default value for w.size in getWPixelSize
Browse files Browse the repository at this point in the history
  • Loading branch information
sambaneko committed Oct 11, 2023
1 parent 25b5579 commit 9227f1d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/webamp/js/selectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 9227f1d

Please sign in to comment.