From bb25ce7731da91fb727bedb6ff167b18740011d7 Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Mon, 29 Jun 2020 00:32:08 +0200 Subject: [PATCH 1/2] Remove tsc import doc because typescript is now natively supported --- README.md | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/README.md b/README.md index 1460671d..ab2ad53c 100644 --- a/README.md +++ b/README.md @@ -77,8 +77,6 @@ Sponsorship also comes with special perks! [![Become a Sponsor](https://img.shie * [Document Updates](#Document-Updates) * [Relative Positions](#Relative-Positions) * [Y.UndoManager](#YUndoManager) -* [Miscellaneous](#Miscellaneous) - * [Typescript Declarations](#Typescript-Declarations) * [Yjs CRDT Algorithm](#Yjs-CRDT-Algorithm) * [License and Author](#License-and-Author) @@ -867,24 +865,6 @@ undoManager.on('stack-item-popped', event => { }) ``` -## Miscellaneous - -### Typescript Declarations - -Yjs has type descriptions. But until [this -ticket](https://github.com/Microsoft/TypeScript/issues/7546) is fixed, this is -how you can make use of Yjs type declarations. - -```json -{ - "compilerOptions": { - "allowJs": true, - "checkJs": true, - }, - "maxNodeModuleJsDepth": 5 -} -``` - ## Yjs CRDT Algorithm *Conflict-free replicated data types* (CRDT) for collaborative editing are an From 2151c514e54ca2c3a5fdd7af6ddb377a3f0850c4 Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Wed, 8 Jul 2020 17:54:41 +0200 Subject: [PATCH 2/2] 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 )