Skip to content

Commit 9507dc3

Browse files
committed
fix: Error about workspace being null on close of window
1 parent 988a618 commit 9507dc3

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/window.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -550,8 +550,11 @@ export class ShellWindow {
550550
if (dimensions) {
551551
[x, y, width, height] = dimensions
552552

553-
const screen = this.meta.get_workspace()
554-
.get_work_area_for_monitor(this.meta.get_monitor())
553+
const workspace = this.meta.get_workspace();
554+
555+
if (workspace === null) return;
556+
557+
const screen = workspace.get_work_area_for_monitor(this.meta.get_monitor())
555558

556559
if (screen) {
557560
x = Math.max(x, screen.x)

0 commit comments

Comments
 (0)