Skip to content

Commit ac5304f

Browse files
author
Paddy Carver
committed
Fix an embarrassing boolean error.
When encoding for msgpack, only encode null values when passed a null value, not when _not_ passed a null value. Oops.
1 parent 0b1f804 commit ac5304f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tfprotov5/tftypes/value_msgpack.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ func marshalMsgPack(val Value, typ Type, p Path, enc *msgpack.Encoder) error {
2020
}
2121
return nil
2222
}
23-
if !val.IsNull() {
23+
if val.IsNull() {
2424
err := enc.EncodeNil()
2525
if err != nil {
2626
return p.NewErrorf("error encoding null value: %w", err)

0 commit comments

Comments
 (0)