handle root document subscriptions

This commit is contained in:
Matt Hill
2021-07-16 17:51:44 -06:00
parent ecaab4b148
commit ce4a24c492

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 {