File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ export interface VisitorResult {
13
13
* Function type for visiting nodes in the model tree
14
14
* @param node The current node being visited
15
15
* @param parent The parent of the current node, or null for top-level nodes
16
- * @returns
16
+ * @returns
17
17
* - void/true to continue normally
18
18
* - false to stop traversal completely
19
19
* - VisitorResult to control traversal or delete nodes
@@ -34,7 +34,7 @@ export function findJsonNodeById(model: IJsonModel, id: string): JsonNode | unde
34
34
result = node ;
35
35
return { skipChildren : true } ; // found it, no need to check children
36
36
}
37
- return true
37
+ return true ;
38
38
} ) ;
39
39
40
40
return result ;
@@ -71,17 +71,17 @@ export function walkJsonModel(model: IJsonModel, visitor: ModelVisitor): void {
71
71
72
72
// Visit current node
73
73
const result = visitor ( node , parent ) ;
74
-
74
+
75
75
// Handle different return types
76
76
if ( result === false ) {
77
77
break ;
78
78
}
79
79
80
- const visitorResult = typeof result === ' object' ? result : undefined ;
81
-
80
+ const visitorResult = typeof result === " object" ? result : undefined ;
81
+
82
82
// Handle deletion if requested
83
83
if ( visitorResult ?. delete && parent && "children" in parent ) {
84
- const index = parent . children . findIndex ( child => child === node ) ;
84
+ const index = parent . children . findIndex ( ( child ) => child === node ) ;
85
85
if ( index !== - 1 ) {
86
86
parent . children . splice ( index , 1 ) ;
87
87
continue ;
You can’t perform that action at this time.
0 commit comments