Skip to content

Commit c39c751

Browse files
author
Andrea Cosentino
committed
fix: guard for patchWalkPath
1 parent d1ba7c8 commit c39c751

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/utils/utils.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ function patchWalkPath(target: any, path: string) {
2828
}
2929

3030
function patchGetValue(obj: any, path: string) {
31-
if (path === '' || path === '/') return obj;
31+
if (path === '' || path === '/') {
32+
return obj;
33+
}
3234
const { parent, key } = patchWalkPath(obj, path);
3335
return parent[key];
3436
}

0 commit comments

Comments
 (0)