Skip to content

Commit

Permalink
Allow falsy attribute values
Browse files Browse the repository at this point in the history
  • Loading branch information
jul13579 committed Mar 1, 2024
1 parent 90675be commit cdbb558
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/types/YText.js
Expand Up @@ -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)
Expand Down

0 comments on commit cdbb558

Please sign in to comment.