@swell/apps-sdk 1.0.165 → 1.0.167
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.mjs
CHANGED
|
@@ -21481,15 +21481,14 @@ ${content.slice(pos)}`;
|
|
|
21481
21481
|
async renderDataFields(data, fields) {
|
|
21482
21482
|
const promises = [];
|
|
21483
21483
|
for (const key of fields) {
|
|
21484
|
-
|
|
21485
|
-
|
|
21486
|
-
|
|
21487
|
-
|
|
21488
|
-
|
|
21489
|
-
|
|
21490
|
-
|
|
21491
|
-
|
|
21492
|
-
}
|
|
21484
|
+
const promise = typeof data[key] === "string" ? this.renderTemplateString(data[key], data) : Promise.resolve();
|
|
21485
|
+
promises.push(
|
|
21486
|
+
promise.then((value) => {
|
|
21487
|
+
return value ? value : this.globals[key];
|
|
21488
|
+
}).then((value) => {
|
|
21489
|
+
data[key] = value;
|
|
21490
|
+
})
|
|
21491
|
+
);
|
|
21493
21492
|
}
|
|
21494
21493
|
if (promises.length > 0) {
|
|
21495
21494
|
data = { ...data };
|