mod-build 3.7.20 → 3.7.21-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 +4 -0
- package/gulp-tasks/templates.js +6 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 3.7.21
|
|
4
|
+
|
|
5
|
+
- Added extra conditions for `addTcpaAboveCta` and `addTcpaBelowCta` helper functions to not break when required data is not passed.
|
|
6
|
+
|
|
3
7
|
## 3.7.20
|
|
4
8
|
|
|
5
9
|
- Added `addTcpaAboveCta` and `addTcpaBelowCta` helper functions to determine where tcpa should be placed based on trade/branded conditions.
|
package/gulp-tasks/templates.js
CHANGED
|
@@ -229,6 +229,9 @@ module.exports = function(gulp, gulpPlugins, siteSettings, siteData) {
|
|
|
229
229
|
{
|
|
230
230
|
name: 'addTcpaAboveCta',
|
|
231
231
|
fn: function(page) {
|
|
232
|
+
if (!page || !page.primary_trade) {
|
|
233
|
+
return false;
|
|
234
|
+
}
|
|
232
235
|
const trade = page.primary_trade.toUpperCase();
|
|
233
236
|
return trade === 'SOLAR' || trade === 'HOME_SECURITY' || page.isBranded;
|
|
234
237
|
}
|
|
@@ -236,6 +239,9 @@ module.exports = function(gulp, gulpPlugins, siteSettings, siteData) {
|
|
|
236
239
|
{
|
|
237
240
|
name: 'addTcpaBelowCta',
|
|
238
241
|
fn: function(page) {
|
|
242
|
+
if (!page || !page.primary_trade) {
|
|
243
|
+
return false;
|
|
244
|
+
}
|
|
239
245
|
const trade = page.primary_trade.toUpperCase();
|
|
240
246
|
return trade !== 'SOLAR' && trade !== 'HOME_SECURITY' && !page.isBranded;
|
|
241
247
|
}
|