Skip to content

Commit 57988b4

Browse files
author
Timothy Johnson
committed
Fixes #18
1 parent 791f45a commit 57988b4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/client/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,12 @@ function serializeNode(node) {
8686
}
8787

8888
const internal = node.detail.$$
89+
const props = Array.isArray(internal.props)
90+
? internal.props // Svelte < 3.13.0 stored props names as an array
91+
: Object.keys(internal.props)
8992
const ctx = clone(internal.ctx)
9093
serialized.detail = {
91-
attributes: internal.props.reduce((o, key) => {
94+
attributes: props.reduce((o, key) => {
9295
const value = ctx[key]
9396
if (value === undefined) return o
9497

0 commit comments

Comments
 (0)