mod-build 3.7.21 → 3.7.22-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/CHANGELOG.md +3 -0
- package/gulp-tasks/templates.js +6 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 3.7.22
|
|
4
|
+
- Added extra conditions for `addTcpaAboveCta` and `addTcpaBelowCta` helper functions to not break when required data is not passed.
|
|
5
|
+
|
|
3
6
|
## 3.7.21
|
|
4
7
|
|
|
5
8
|
- Added `GUTTERS` & `GUTTER_COVERS` to the `addTcpaAboveCta` and `addTcpaBelowCta` configurations.
|
package/gulp-tasks/templates.js
CHANGED
|
@@ -231,6 +231,9 @@ module.exports = function(gulp, gulpPlugins, siteSettings, siteData) {
|
|
|
231
231
|
{
|
|
232
232
|
name: 'addTcpaAboveCta',
|
|
233
233
|
fn: function(page) {
|
|
234
|
+
if (!page || !page.primary_trade) {
|
|
235
|
+
return false;
|
|
236
|
+
}
|
|
234
237
|
const trade = page.primary_trade.replace(/\s+/g, '_').toUpperCase();
|
|
235
238
|
return tradesWithTcpaAboveCta.includes(trade) || page.isBranded;
|
|
236
239
|
}
|
|
@@ -238,8 +241,10 @@ module.exports = function(gulp, gulpPlugins, siteSettings, siteData) {
|
|
|
238
241
|
{
|
|
239
242
|
name: 'addTcpaBelowCta',
|
|
240
243
|
fn: function(page) {
|
|
244
|
+
if (!page || !page.primary_trade) {
|
|
245
|
+
return false;
|
|
246
|
+
}
|
|
241
247
|
const trade = page.primary_trade.replace(/\s+/g, '_').toUpperCase();
|
|
242
|
-
|
|
243
248
|
return !tradesWithTcpaAboveCta.includes(trade) && !page.isBranded;
|
|
244
249
|
}
|
|
245
250
|
}
|