File tree 1 file changed +3
-4
lines changed
1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -51,17 +51,16 @@ const combinedData = extractCommentsAndExamples(markdownContent);
51
51
function applyUpdates ( updates , baseDoc ) {
52
52
updates . forEach ( update => {
53
53
try {
54
-
55
54
// Handle root document case
56
- if ( jsonPointerPath === '' ) {
55
+ if ( update . json_pointer === '' ) {
57
56
baseDoc = mergePatch . apply ( baseDoc , update . example ) ;
58
57
return ;
59
58
}
60
59
61
60
// For non-root cases, use jsonpointer to get and set the correct location
62
- const targetObject = jsonpointer . get ( baseDoc , jsonPointerPath ) ;
61
+ const targetObject = jsonpointer . get ( baseDoc , update . json_pointer ) ;
63
62
const updatedObject = mergePatch . apply ( targetObject || { } , update . example ) ;
64
- jsonpointer . set ( baseDoc , jsonPointerPath , updatedObject ) ;
63
+ jsonpointer . set ( baseDoc , update . json_pointer , updatedObject ) ;
65
64
66
65
} catch ( e ) {
67
66
console . error ( `\nError processing update for '${ update . name } ' at path '${ update . json_pointer } '` , e ) ;
You can’t perform that action at this time.
0 commit comments