Skip to content

Commit

Permalink
Merge pull request #619 from jul13579/allow-falsy-attribute-values
Browse files Browse the repository at this point in the history
Allow falsy attribute values
  • Loading branch information
dmonad committed Mar 1, 2024
2 parents 90675be + cdbb558 commit 83db6c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/types/YText.js
Original file line number Diff line number Diff line change
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 83db6c8

Please sign in to comment.