Use more more optional chaining in the src/ folder

This commit is contained in:
Jonas Jenwald 2026-07-29 18:23:14 +02:00
parent 4d9007e6f9
commit 1813ab0774
2 changed files with 7 additions and 12 deletions

View File

@ -190,11 +190,9 @@ class Builder {
if (hasNamespace) { if (hasNamespace) {
this._currentNamespace = this._namespaceStack.pop(); this._currentNamespace = this._namespaceStack.pop();
} }
if (prefixes) { prefixes?.forEach(({ prefix }) => {
prefixes.forEach(({ prefix }) => { this._namespacePrefixes.get(prefix).pop();
this._namespacePrefixes.get(prefix).pop(); });
});
}
if (nsAgnostic) { if (nsAgnostic) {
this._nsAgnosticLevel--; this._nsAgnosticLevel--;
} }

View File

@ -43,13 +43,10 @@ class ProxyHandler {
} }
set(obj, prop, value) { set(obj, prop, value) {
if (obj._kidIds) { // If the field is a container for other fields then dispatch the kids.
// If the field is a container for other fields then obj._kidIds?.forEach(id => {
// dispatch the kids. obj._appObjects[id].wrapped[prop] = value;
obj._kidIds.forEach(id => { });
obj._appObjects[id].wrapped[prop] = value;
});
}
if (typeof prop === "string" && !prop.startsWith("_") && prop in obj) { if (typeof prop === "string" && !prop.startsWith("_") && prop in obj) {
const old = obj[prop]; const old = obj[prop];