Skip to content

Commit

Permalink
fix(comlink): handle heartbeat compatibility correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
stipsan committed Oct 21, 2024
1 parent 19cc6c9 commit a29272e
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/core-loader/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ npm install @sanity/core-loader @sanity/client
[gzip-badge]: https://img.shields.io/bundlephobia/minzip/@sanity/core-loader?label=gzip%20size&style=flat-square
[size-badge]: https://img.shields.io/bundlephobia/min/@sanity/core-loader?label=size&style=flat-square
[bundlephobia]: https://bundlephobia.com/package/@sanity/core-loader

1 change: 1 addition & 0 deletions packages/next-loader/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@
[gzip-badge]: https://img.shields.io/bundlephobia/minzip/@sanity/next-loader?label=gzip%20size&style=flat-square
[size-badge]: https://img.shields.io/bundlephobia/min/@sanity/next-loader?label=size&style=flat-square
[bundlephobia]: https://bundlephobia.com/package/@sanity/next-loader

1 change: 1 addition & 0 deletions packages/react-loader/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -223,3 +223,4 @@ export default function ProductTemplate(props: Props) {
[gzip-badge]: https://img.shields.io/bundlephobia/minzip/@sanity/react-loader?label=gzip%20size&style=flat-square
[size-badge]: https://img.shields.io/bundlephobia/min/@sanity/react-loader?label=size&style=flat-square
[bundlephobia]: https://bundlephobia.com/package/@sanity/react-loader

1 change: 1 addition & 0 deletions packages/svelte-loader/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -257,3 +257,4 @@ Finally, we enable both live mode and overlays in the root layout component.
[gzip-badge]: https://img.shields.io/bundlephobia/minzip/@sanity/svelte-loader?label=gzip%20size&style=flat-square
[size-badge]: https://img.shields.io/bundlephobia/min/@sanity/svelte-loader?label=size&style=flat-square
[bundlephobia]: https://bundlephobia.com/package/@sanity/svelte-loader

4 changes: 4 additions & 0 deletions packages/visual-editing-helpers/src/comlinkCompatibility.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,10 @@ const convertToChannelsMessage = (message: ProtocolMessage): ProtocolMessage =>

message.type = comlinkToChannelsMap[message.type as ComlinkMessageType] ?? message.type

if (message.type === 'channel/response' && message.responseTo && !message.data) {
message.data = {responseTo: message.responseTo}
}

return message
}

Expand Down
1 change: 1 addition & 0 deletions packages/visual-editing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -454,3 +454,4 @@ enableVisualEditing({
[remix]: https://remix.run/
[sveltekit]: https://kit.svelte.dev/
[server-actions]: https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations

0 comments on commit a29272e

Please sign in to comment.