From 21ab0002f1d71c29bf280837f395d0a1a06ea933 Mon Sep 17 00:00:00 2001 From: denny Date: Wed, 10 Jul 2019 12:06:43 -0500 Subject: [PATCH] change the if/else for regex,prefix,postfix to an if statement so they may all be used --- list-card.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/list-card.js b/list-card.js index ed0cbc4..ed04205 100644 --- a/list-card.js +++ b/list-card.js @@ -160,9 +160,11 @@ class ListCard extends HTMLElement { if (columns[column].hasOwnProperty('regex')) { newText = new RegExp(columns[column].regex).exec(feed[entry][columns[column].field]); - } else if (columns[column].hasOwnProperty('prefix')) { + } + if (columns[column].hasOwnProperty('prefix')) { newText = columns[column].prefix + newText; - } else if (columns[column].hasOwnProperty('postfix')) { + } + if (columns[column].hasOwnProperty('postfix')) { newText += columns[column].postfix; }