Skip to content

Commit

Permalink
Merge pull request #727 from smapiot/develop
Browse files Browse the repository at this point in the history
Release 1.7.2
  • Loading branch information
FlorianRappl authored Nov 8, 2024
2 parents 83508f6 + 59c26b1 commit 6b3dc31
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Piral Changelog

## 1.7.2 (tbd)

- Fixed removal of `MutationEvent` in recent Chrome in `piral-blazor` (#724) by @dheid
- Fixed inclusion of React components in serialized dev tools message (#726)

## 1.7.1 (November 2, 2024)

- Fixed `engines` field to have a constraint for Node.js >=18.17
Expand Down
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
2 changes: 2 additions & 0 deletions src/utilities/piral-debug-utils/src/decycle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ export function decycle(obj: Record<string, any>) {
return `<error>`;
} else if (_value instanceof Node) {
return `<node>`;
} else if (_value['$$typeof'] === Symbol.for('react.element')) {
return '<react.element>';
} else if (typeof _value === 'object') {
for (let i = 0; i < objects.length; i++) {
if (objects[i] === _value) {
Expand Down

0 comments on commit 6b3dc31

Please sign in to comment.