Skip to content

Commit

Permalink
Merge pull request #13 from dennyreiter/regex_with_prefix_postfix
Browse files Browse the repository at this point in the history
Change the if/else for regex,prefix,postfix to an if statement
  • Loading branch information
iantrich authored Jul 30, 2019
2 parents 91e62c9 + 21ab000 commit b924559
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions list-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit b924559

Please sign in to comment.