Skip to content

Commit

Permalink
perf: use for of instead of forEach
Browse files Browse the repository at this point in the history
  • Loading branch information
posva committed Feb 20, 2024
1 parent b14b020 commit 1635745
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/treeNodeValue.ts
Expand Up @@ -116,10 +116,10 @@ class _TreeNodeValueBase {
* @param key - key to remove from the override, e.g. path, name, etc
*/
removeOverride(key: keyof CustomRouteBlock) {
this._overrides.forEach((routeBlock) => {
for (const [_filePath, routeBlock] of this._overrides) {
// @ts-expect-error
delete routeBlock[key]
})
}
}

/**
Expand Down

0 comments on commit 1635745

Please sign in to comment.