fix: garbage cursors on client

This commit is contained in:
cudr
2019-10-27 17:15:16 +03:00
parent 8d7a10be1b
commit eccece2740
3 changed files with 47 additions and 6 deletions

View File

@@ -1,7 +1,7 @@
import { SyncDoc, Path } from '../model'
import { NodeJSON } from 'slate'
export const isTree = (node: NodeJSON): any => node.object !== 'text'
export const isTree = (node: NodeJSON): any => node && node.object !== 'text'
export const getTarget = (doc: SyncDoc, path: Path) => {
const iterate = (current: any, idx: number) => {