Skip to content

Commit

Permalink
Fix dialog loading
Browse files Browse the repository at this point in the history
  • Loading branch information
simonhamp committed Oct 30, 2024
1 parent 9139906 commit 817cb77
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 1 addition & 5 deletions src/Dialog.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,7 @@ public function properties(array $properties): self

public function asSheet(?string $windowId = null): self
{
if (is_null($windowId)) {
$this->windowReference = Window::current()->id;
} else {
$this->windowReference = $windowId;
}
$this->windowReference = $windowId ?? Window::current()->getId();

return $this;
}
Expand Down
5 changes: 5 additions & 0 deletions src/Windows/Window.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,11 @@ public function id(string $id = 'main'): self
return $this;
}

public function getId(): string
{
return $this->id;
}

public function title(string $title): self
{
$this->title = $title;
Expand Down

0 comments on commit 817cb77

Please sign in to comment.