Skip to content

Commit

Permalink
Work around some JS bug
Browse files Browse the repository at this point in the history
  • Loading branch information
dkhalanskyjb committed Apr 14, 2023
1 parent d23960a commit 5b0118c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/common/src/internal/format/Format.kt
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ private fun <T> FormatStructure<T>.parser(): ParserStructure<T> = when (this) {
isNegativeSetter = { value, isNegative ->
for (field in fields) {
val wasNegative = field.isNegative.get(value) == true
field.isNegative.set(value, isNegative xor wasNegative)
// TODO: replacing `!=` with `xor` fails on JS
field.isNegative.set(value, isNegative != wasNegative)
}
},
withPlusSign = withPlusSign,
Expand Down

0 comments on commit 5b0118c

Please sign in to comment.