Closed tdondich closed 7 months ago
When using livewire v3, if dispatchCloseEvent is true in the component, the following error occurs:
Only arrays and Traversables can be unpacked
This is because in modal.js, we have the following:
if (this.getActiveComponentModalAttribute('dispatchCloseEvent') === true) { const componentName = this.$wire.get('components')[this.activeComponent].name; Livewire.dispatch('modalClosed', componentName); }
Note the old syntax of Livewire.dispatch. It should, ideally be refactored to:
if (this.getActiveComponentModalAttribute('dispatchCloseEvent') === true) { const componentName = this.$wire.get('components')[this.activeComponent].name; Livewire.dispatch('modalClosed', {component: componentName}); }
Fixed in latest release
When using livewire v3, if dispatchCloseEvent is true in the component, the following error occurs:
Only arrays and Traversables can be unpacked
This is because in modal.js, we have the following:
Note the old syntax of Livewire.dispatch. It should, ideally be refactored to: