fix(core): Invalid NODES_INCLUDE should not crash the app (#7038)

Fixes #6683
This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2023-08-29 11:19:40 +02:00
committed by GitHub
parent 38579e538e
commit 04e3178901

View File

@@ -371,8 +371,10 @@ export class LazyPackageDirectoryLoader extends PackageDirectoryLoader {
if (this.includeNodes.length) {
const allowedNodes: typeof this.known.nodes = {};
for (const nodeName of this.includeNodes) {
if (nodeName in this.known.nodes) {
allowedNodes[nodeName] = this.known.nodes[nodeName];
}
}
this.known.nodes = allowedNodes;
this.types.nodes = this.types.nodes.filter((nodeType) =>