return whole doc, better unsubscribe

This commit is contained in:
Matt Hill
2021-07-20 11:23:06 -06:00
committed by Aiden McClelland
parent 6c7e934b50
commit 7fb8e9b6da
2 changed files with 12 additions and 10 deletions

View File

@@ -25,6 +25,7 @@ export type Doc = { [key: string]: any }
export type Operation = AddOperation<any> | RemoveOperation | ReplaceOperation<any>
export function getValueByPointer (document: any, pointer: string): any {
if (pointer === '/') return document
const pathArr = pointer.split('/')
pathArr.shift()
try {