@bigcommerce/stencil-paper-handlebars
Advanced tools
Comparing version 5.4.1 to 5.4.2
@@ -86,4 +86,6 @@ 'use strict'; | ||
var result = ''; | ||
for (var i = 0; i < array.length; i++) { | ||
result += options.fn({item: array[i], index: i}); | ||
if (Array.isArray(array)) { | ||
for (var i = 0; i < array.length; i++) { | ||
result += options.fn({item: array[i], index: i}); | ||
} | ||
} | ||
@@ -287,2 +289,5 @@ return result; | ||
helpers.last = function(array, n) { | ||
if (!Array.isArray(array)) { | ||
return []; | ||
} | ||
if (!utils.isNumber(n)) { | ||
@@ -289,0 +294,0 @@ return array[array.length - 1]; |
@@ -471,3 +471,3 @@ 'use strict'; | ||
} | ||
if (typeof options === 'object' && options.fn) { | ||
if (options && typeof options === 'object' && options.fn) { | ||
return options.fn(this).toUpperCase(); | ||
@@ -474,0 +474,0 @@ } |
@@ -173,3 +173,3 @@ 'use strict'; | ||
return typeof val === 'undefined' | ||
|| (!!val.hash); | ||
|| (val && !!val.hash); | ||
}; | ||
@@ -176,0 +176,0 @@ |
@@ -17,3 +17,3 @@ 'use strict'; | ||
const preparedContainer = utils.isObject(container) ? Object.values(container) : container; | ||
const contained = preparedContainer ? preparedContainer.includes(value) : false; | ||
const contained = preparedContainer && preparedContainer.includes ? preparedContainer.includes(value) : false; | ||
@@ -20,0 +20,0 @@ // Yield block if true |
{ | ||
"name": "@bigcommerce/stencil-paper-handlebars", | ||
"version": "5.4.1", | ||
"version": "5.4.2", | ||
"description": "A paper plugin to render pages using Handlebars.js", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
850218
6030