Skip to content
This repository was archived by the owner on Sep 14, 2023. It is now read-only.

Commit 5ba6e8a

Browse files
fix: add optional field handling (#1155)
1 parent 9c5bb2c commit 5ba6e8a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

patterns/compat/pjs_sender.ts

+1
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ const pjsExtraKeyMap: Record<string, KeyHandler> = {
8888
// pjs essentially spreads this into the extrinsic
8989
const visitor: $.CodecVisitor<$.Codec<any>> = new $.CodecVisitor<$.Codec<any>>()
9090
.add($.field, (_, key, value) => $.field(key, $pjs(value)))
91+
.add($.optionalField, (_, key, value) => $.optionalField(key, $pjs(value)))
9192
.add($.object, (_, ...fields) => $.object(...fields.map((x) => visitor.visit(x))))
9293
return visitor.visit(value)
9394
},

0 commit comments

Comments
 (0)