diff --git a/client/lib/json-patch-lib.ts b/client/lib/json-patch-lib.ts index 5ccf5b4..c88371b 100644 --- a/client/lib/json-patch-lib.ts +++ b/client/lib/json-patch-lib.ts @@ -25,6 +25,7 @@ export type Doc = { [key: string]: any } export type Operation = AddOperation | RemoveOperation | ReplaceOperation export function getValueByPointer (document: any, pointer: string): any { + if (pointer === '/') return document const pathArr = pointer.split('/') pathArr.shift() try {