Skip to content

Commit 817cb77

Browse files
committed
Fix dialog loading
1 parent 9139906 commit 817cb77

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/Dialog.php

+1-5
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,7 @@ public function properties(array $properties): self
110110

111111
public function asSheet(?string $windowId = null): self
112112
{
113-
if (is_null($windowId)) {
114-
$this->windowReference = Window::current()->id;
115-
} else {
116-
$this->windowReference = $windowId;
117-
}
113+
$this->windowReference = $windowId ?? Window::current()->getId();
118114

119115
return $this;
120116
}

src/Windows/Window.php

+5
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,11 @@ public function id(string $id = 'main'): self
7979
return $this;
8080
}
8181

82+
public function getId(): string
83+
{
84+
return $this->id;
85+
}
86+
8287
public function title(string $title): self
8388
{
8489
$this->title = $title;

0 commit comments

Comments
 (0)