From 2151c514e54ca2c3a5fdd7af6ddb377a3f0850c4 Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Wed, 8 Jul 2020 17:54:41 +0200 Subject: [PATCH] fix empty parentYKey issue --- src/structs/Item.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/structs/Item.js b/src/structs/Item.js index 95acec56..41f44b96 100644 --- a/src/structs/Item.js +++ b/src/structs/Item.js @@ -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 )