Merge pull request #21615 from Snuffleupagus/Binder-reuse-NS_DATASETS

Re-use the `NS_DATASETS` constant more in the `src/core/xfa/bind.js` file
This commit is contained in:
Tim van der Meij 2026-07-21 20:16:39 +02:00 committed by GitHub
commit f988c56394
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

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