Skip to content

Commit

Permalink
fix: added type guard to color validation
Browse files Browse the repository at this point in the history
  • Loading branch information
chadfurman authored and iRyusa committed Jul 6, 2021
1 parent f3bda73 commit 89fe24c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/mjml-core/src/types/color.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default () =>
}

getValue() {
if (this.value.match(shorthandRegex)) {
if (typeof this.value === 'string' && this.value.match(shorthandRegex)) {
return this.value.replace(replaceInputRegex, replaceOutput)
}

Expand Down

0 comments on commit 89fe24c

Please sign in to comment.