Skip to content

Commit

Permalink
gaurd win.setPosition
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmarkclements committed Jul 30, 2024
1 parent 8ed71ff commit 5ad884a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gui/gui.js
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,7 @@ function applyGuiOption (win, key, value) {
let y = Math.round(curY - ((height - currentHeight) / 2))
x = x < 0 ? 0 : x
y = y < 0 ? 0 : y
win.setPosition(x, y, true)
try { win.setPosition(x, y, true) } catch { /* ignore */ }
return win.setSize(width, height, true)
}
case 'x:y': return win.setPosition(value[0], value[1], true)
Expand Down

0 comments on commit 5ad884a

Please sign in to comment.