Replies: 3 comments 1 reply
|
Do you emit events by any chance when closing the modal? |
1 reply
|
Seems we do have a listener for the modal (we were having an issue with modals sending events after the user session had expired, well I seem to remember that is why this was added?) <?php
namespace App\Livewire;
use LivewireUI\Modal\ModalComponent as LivewireUIModalComponent;
class ModalComponent extends LivewireUIModalComponent
{
public function boot(): void
{
$this->listeners['modalClosed'] = 'checkUser';
}
public function checkUser()
{
if (! auth()->check()) {
exit;
}
}
} |
0 replies
|
The error |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I'm upgrading to Livewire 3 and thought I had everything sorted. I can open modals without any issues however when closing them (either via a button or simply clicking away or hitting escape) I get an error rendered:
Only arrays and Traversables can be unpackedI did see there was a PR about this for destroying modals and properly passing arguments. As this is closing a modal there doesn't appear to be anything I can do directly?
All reactions