Skip to content

Commit

Permalink
Merge pull request #725 from dheid/develop
Browse files Browse the repository at this point in the history
Fixes #724
  • Loading branch information
FlorianRappl authored Nov 4, 2024
2 parents 0ddf0b3 + 445bc89 commit 007e055
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/converters/piral-blazor/src/events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ function dispatchToRoot(event: any) {
performInternalNavigation(event);
}

// the mutation event cannot be cloned (at least in Webkit-based browsers)
if (!(event instanceof MutationEvent) && !event.processed) {
if ((typeof MutationEvent === 'undefined' || !(event instanceof MutationEvent)) && !event.processed) {
const eventClone = new event.constructor(event.type, event);
document.getElementById(blazorRootId)?.dispatchEvent(eventClone);
// make sure to only process every event once; even though multiple boundaries might be active
Expand Down

0 comments on commit 007e055

Please sign in to comment.