mod-build 3.6.54 → 3.6.56-beta.1
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/CHANGELOG.md +3 -1
- package/gulp-tasks/templates.js +8 -6
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 3.6.55
|
|
4
|
+
- Added conditional to check if `siteData` is empty — so our `fetchTcpaFromSitegenie()` and `getDefaultFormFieldConfig()` functions won't try to run on modify.modernize.com
|
|
5
|
+
|
|
3
6
|
## 3.6.54
|
|
4
7
|
|
|
5
8
|
- swapping out `modUtils.getHeapCookieData()` in the old (but still used) mod-form-contractor.js
|
|
@@ -12,7 +15,6 @@
|
|
|
12
15
|
|
|
13
16
|
- Added `templatesData.primary_trade` conditional to the `fetchTcpaFromSitegenie()` function so it won't try to run on quote/home-remodel
|
|
14
17
|
|
|
15
|
-
|
|
16
18
|
## 3.6.50
|
|
17
19
|
|
|
18
20
|
- Added functionality in `templates.js` to grab the tcpa from sitegenie at build time
|
package/gulp-tasks/templates.js
CHANGED
|
@@ -231,7 +231,7 @@ module.exports = function(gulp, gulpPlugins, siteSettings, siteData) {
|
|
|
231
231
|
throw new Error(`${xhr.statusCode}: Error while fetching TCPA`);
|
|
232
232
|
}
|
|
233
233
|
const responseJson = await JSON.parse(response);
|
|
234
|
-
const finalTCPA = await company === 'Modernize' ? responseJson.tcpa.replace(/QuinStreet/g, 'Modernize') : responseJson.tcpa;
|
|
234
|
+
const finalTCPA = await (company === 'Modernize' || templatesData.useModernizeInTCPA) ? responseJson.tcpa.replace(/QuinStreet/g, 'Modernize') : responseJson.tcpa;
|
|
235
235
|
|
|
236
236
|
templatesData.tcpaText = await finalTCPA;
|
|
237
237
|
|
|
@@ -242,12 +242,14 @@ module.exports = function(gulp, gulpPlugins, siteSettings, siteData) {
|
|
|
242
242
|
};
|
|
243
243
|
|
|
244
244
|
return async function() {
|
|
245
|
-
if (
|
|
246
|
-
|
|
247
|
-
|
|
245
|
+
if (Object.keys(siteData).length > 0) {
|
|
246
|
+
if (!templatesData.doNotUseDefaultFieldConfig && !templatesData.defaultConfigCompleted) {
|
|
247
|
+
await getDefaultFormFieldConfig();
|
|
248
|
+
}
|
|
248
249
|
|
|
249
|
-
|
|
250
|
-
|
|
250
|
+
if (!templatesData.tcpaText && templatesData.primary_trade) {
|
|
251
|
+
await fetchTcpaFromSitegenie();
|
|
252
|
+
}
|
|
251
253
|
}
|
|
252
254
|
|
|
253
255
|
return gulp.src([
|