@swell/apps-sdk 1.0.165 → 1.0.166
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +8 -9
- package/dist/index.cjs.map +2 -2
- package/dist/index.js +8 -9
- package/dist/index.js.map +2 -2
- package/dist/index.mjs +8 -9
- package/dist/index.mjs.map +2 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -21621,15 +21621,14 @@ ${content.slice(pos)}`;
|
|
|
21621
21621
|
async renderDataFields(data, fields) {
|
|
21622
21622
|
const promises = [];
|
|
21623
21623
|
for (const key of fields) {
|
|
21624
|
-
|
|
21625
|
-
|
|
21626
|
-
|
|
21627
|
-
|
|
21628
|
-
|
|
21629
|
-
|
|
21630
|
-
|
|
21631
|
-
|
|
21632
|
-
}
|
|
21624
|
+
const promise = typeof data[key] === "string" ? this.renderTemplateString(data[key], data) : Promise.resolve();
|
|
21625
|
+
promises.push(
|
|
21626
|
+
promise.then((value) => {
|
|
21627
|
+
return value ? value : this.globals[key];
|
|
21628
|
+
}).then((value) => {
|
|
21629
|
+
data[key] = value;
|
|
21630
|
+
})
|
|
21631
|
+
);
|
|
21633
21632
|
}
|
|
21634
21633
|
if (promises.length > 0) {
|
|
21635
21634
|
data = { ...data };
|