10000 Fix menubar not ready by SRWieZ · Pull Request #453 · NativePHP/laravel · GitHub
[go: up one dir, main page]

Skip to content

Fix menubar not ready #453

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Dec 29, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
1028D Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix: menubar not ready
  • Loading branch information
SRWieZ committed Dec 25, 2024
commit 345b37a291cdd442cf58d497a49467da32501786
9 changes: 7 additions & 2 deletions src/MenuBar/PendingCreateMenuBar.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,18 @@

class PendingCreateMenuBar extends MenuBar
{
protected bool $created = false;

public function __destruct()
{
$this->create();
if (! $this->created) {
$this->create();
}
}

protected function create(): void
public function create(): void
{
$this->client->post('menu-bar/create', $this->toArray());
$this->created = true;
}
}
0