Skip to content

Commit 2ee426f

Browse files
author
Timothy Johnson
committed
Fix bug in attribute mapping
1 parent 5f1df8a commit 2ee426f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/client/index.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,11 @@ function serializeNode(node) {
115115

116116
serialized.detail = {
117117
attributes: props.flatMap(key => {
118+
const value = ctx[key]
118119
delete ctx[key]
119-
return ctx[key] === undefined
120+
return value === undefined
120121
? []
121-
: { key, value: ctx[key], isBound: key in internal.bound }
122+
: { key, value, isBound: key in internal.bound }
122123
}),
123124
listeners: Object.entries(internal.callbacks).flatMap(
124125
([event, value]) => value.map(o => ({ event, handler: o.toString() }))

0 commit comments

Comments
 (0)