Skip to content
This repository has been archived by the owner on Oct 18, 2024. It is now read-only.

Commit

Permalink
Strip leading slashes for Livewire events (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
stebrl authored Sep 18, 2024
1 parent 8585a17 commit 665f1f9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/preload/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ ipcRenderer.on('log', (event, {level, message, context}) => {

// Add Livewire event listeners
ipcRenderer.on('native-event', (event, data) => {


// Strip leading slashes
data.event = data.event.replace(/^(\\)+/, '');

// add support for livewire 3
// @ts-ignore
if (window.Livewire) {
Expand Down

0 comments on commit 665f1f9

Please sign in to comment.