mirror of
https://github.com/yjs/yjs.git
synced 2025-12-29 00:25:01 +01:00
Allow falsy attribute values
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user