From cdbb55818dab520fa09987e19d82766e7dddfad9 Mon Sep 17 00:00:00 2001 From: Julian Lehrhuber Date: Fri, 1 Mar 2024 10:37:51 +0100 Subject: [PATCH] Allow falsy attribute values --- src/types/YText.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/types/YText.js b/src/types/YText.js index c02ae6e5..50a21490 100644 --- a/src/types/YText.js +++ b/src/types/YText.js @@ -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)