mod-build 3.6.41-beta.1 → 3.6.41-beta.2
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/gulp-tasks/templates.js +3 -2
- package/package.json +1 -1
package/gulp-tasks/templates.js
CHANGED
|
@@ -168,16 +168,17 @@ module.exports = function(gulp, gulpPlugins, siteSettings, siteData) {
|
|
|
168
168
|
|
|
169
169
|
var getDefaultFormFieldConfig = async function() {
|
|
170
170
|
const siteData = templatesData;
|
|
171
|
+
const steps = siteData.steps || siteData.qsSteps || siteData.modSteps;
|
|
171
172
|
await new Promise((resolve) => {
|
|
172
173
|
request(`https://${siteSettings.nodeEnv}/quote/resources/mod-site/shared-components/steps/defaultFormFieldConfig.json`, async function(err, xhr, response) {
|
|
173
174
|
if (xhr.statusCode !== 200) {
|
|
174
175
|
throw new Error(`${xhr.statusCode}: Error while fetching shared-components/defaultFormFieldConfig.json`);
|
|
175
176
|
}
|
|
176
|
-
if (!
|
|
177
|
+
if (!steps) {
|
|
177
178
|
throw new Error('steps not found!');
|
|
178
179
|
}
|
|
179
180
|
response = await JSON.parse(response);
|
|
180
|
-
|
|
181
|
+
steps.items.forEach(item => {
|
|
181
182
|
item.fields = item.fields.map(field => {
|
|
182
183
|
if (field.name && response[field.name]) {
|
|
183
184
|
field = Object.assign(response[field.name], field);
|