Skip to content

Commit 5b0118c

Browse files
committed
Work around some JS bug
1 parent d23960a commit 5b0118c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

core/common/src/internal/format/Format.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,8 @@ private fun <T> FormatStructure<T>.parser(): ParserStructure<T> = when (this) {
130130
isNegativeSetter = { value, isNegative ->
131131
for (field in fields) {
132132
val wasNegative = field.isNegative.get(value) == true
133-
field.isNegative.set(value, isNegative xor wasNegative)
133+
// TODO: replacing `!=` with `xor` fails on JS
134+
field.isNegative.set(value, isNegative != wasNegative)
134135
}
135136
},
136137
withPlusSign = withPlusSign,

0 commit comments

Comments
 (0)