fix empty parentYKey issue

This commit is contained in:
Kevin Jahns 2020-07-08 17:54:41 +02:00
parent bb25ce7731
commit 2151c514e5

View File

@ -785,7 +785,7 @@ export const readItem = (decoder, id, info, doc) => {
return new Item(
id, null, origin, null, rightOrigin,
canCopyParentInfo && !hasParentYKey ? readID(decoder) : (parentYKey ? doc.get(parentYKey) : null), // parent
canCopyParentInfo && !hasParentYKey ? readID(decoder) : (parentYKey !== null ? doc.get(parentYKey) : null), // parent
canCopyParentInfo && (info & binary.BIT6) === binary.BIT6 ? decoding.readVarString(decoder) : null, // parentSub
/** @type {AbstractContent} */ (readItemContent(decoder, info)) // item content
)