From 0a9a8bbaacd932b2fce2f950a14ca3d297bd4dfe Mon Sep 17 00:00:00 2001 From: marc tobias Date: Thu, 20 Feb 2020 18:05:45 +0100 Subject: [PATCH] check aPlace.class exists before calling its method --- src/handlebar_helpers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/handlebar_helpers.js b/src/handlebar_helpers.js index 3ef3a66..088d09c 100644 --- a/src/handlebar_helpers.js +++ b/src/handlebar_helpers.js @@ -110,7 +110,7 @@ Handlebars.registerHelper({ return s && s[0].toUpperCase() + s.slice(1); } - if (aPlace.type && aPlace.type === 'yes') { + if (aPlace.type && aPlace.type === 'yes' && aPlace.class) { return capitalize(aPlace.class.replace(/_/g, ' ')); } return capitalize(aPlace.type.replace(/_/g, ' ')); -- 2.39.5