Skip to content

Commit

Permalink
fix(core): Invalid NODES_INCLUDE should not crash the app (#7038)
Browse files Browse the repository at this point in the history
Fixes #6683
  • Loading branch information
netroy authored Aug 29, 2023
1 parent 38579e5 commit 04e3178
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/core/src/DirectoryLoader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,9 @@ export class LazyPackageDirectoryLoader extends PackageDirectoryLoader {
if (this.includeNodes.length) {
const allowedNodes: typeof this.known.nodes = {};
for (const nodeName of this.includeNodes) {
allowedNodes[nodeName] = this.known.nodes[nodeName];
if (nodeName in this.known.nodes) {
allowedNodes[nodeName] = this.known.nodes[nodeName];
}
}
this.known.nodes = allowedNodes;

Expand Down

0 comments on commit 04e3178

Please sign in to comment.