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

Commit 665f1f9

Browse files
authored
Strip leading slashes for Livewire events (#41)
1 parent 8585a17 commit 665f1f9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/preload/index.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ ipcRenderer.on('log', (event, {level, message, context}) => {
2121

2222
// Add Livewire event listeners
2323
ipcRenderer.on('native-event', (event, data) => {
24-
24+
25+
// Strip leading slashes
26+
data.event = data.event.replace(/^(\\)+/, '');
27+
2528
// add support for livewire 3
2629
// @ts-ignore
2730
if (window.Livewire) {

0 commit comments

Comments
 (0)