Re-use the NS_DATASETS constant more in the src/core/xfa/bind.js file

This commit is contained in:
Jonas Jenwald 2026-07-21 16:04:24 +02:00
parent 028c02f539
commit 69e26ad319

View File

@ -55,8 +55,7 @@ class Binder {
constructor(root) { constructor(root) {
this.root = root; this.root = root;
this.datasets = root.datasets; this.datasets = root.datasets;
this.data = this.data = root.datasets?.data || new XmlObject(NS_DATASETS, "data");
root.datasets?.data || new XmlObject(NamespaceIds.datasets.id, "data");
this.emptyMerge = this.data[$getChildren]().length === 0; this.emptyMerge = this.data[$getChildren]().length === 0;
this.root.form = this.form = root.template[$clone](); this.root.form = this.form = root.template[$clone]();
@ -137,7 +136,7 @@ class Binder {
} }
} }
if ( if (
dataNode[$namespaceId] === NamespaceIds.datasets.id && dataNode[$namespaceId] === NS_DATASETS &&
dataNode[$nodeName] === "data" dataNode[$nodeName] === "data"
) { ) {
break; break;