Merge pull request #619 from jul13579/allow-falsy-attribute-values

Allow falsy attribute values
This commit is contained in:
Kevin Jahns 2024-03-01 11:23:04 +01:00 committed by GitHub
commit 83db6c814c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -227,7 +227,7 @@ const insertAttributes = (transaction, parent, currPos, attributes) => {
// insert format-start items
for (const key in attributes) {
const val = attributes[key]
const currentVal = currPos.currentAttributes.get(key) || null
const currentVal = currPos.currentAttributes.get(key) ?? null
if (!equalAttrs(currentVal, val)) {
// save negated attribute (set null if currentVal undefined)
negatedAttributes.set(key, currentVal)