We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7cfe59d commit 8608146Copy full SHA for 8608146
plugins/rules/memberAccess.ts
@@ -99,16 +99,16 @@ const noRepeatedMemberAccess = createRule({
99
markChainAsModified(properties: string[]): void {
100
let current = this.root;
101
102
- // Navigate to the target node
+ // Navigate to the target node, creating nodes if they don't exist
103
for (const prop of properties) {
104
const child = current.children.get(prop);
105
if (child) {
106
current = child;
107
} else {
108
// Create the chain if it doesn't exist
109
- current = current.getOrCreateChild(prop);
110
- current.parent = current;
111
- current.modified = true;
+ const newChild = current.getOrCreateChild(prop);
+ newChild.parent = current;
+ current = newChild;
112
}
113
114
0 commit comments