Update client/lib/json-patch-lib.ts

This commit is contained in:
Lucy C
2022-10-03 10:45:05 -06:00
committed by GitHub
parent 1eba576ac1
commit feb5c428db

View File

@@ -60,6 +60,7 @@ export function pathFromArray(args: Array<string | number>): string {
args args
.map(a => .map(a =>
String(a) String(a)
// do not change order, "~" needs to be replaced first
.replace(new RegExp('~', 'g'), '~0') .replace(new RegExp('~', 'g'), '~0')
.replace(new RegExp('/', 'g'), '~1'), .replace(new RegExp('/', 'g'), '~1'),
) )