Skip to content

Commit 3c8abdd

Browse files
author
Ian Wensink
committed
fix(calculate-formula): make sure Hidden component has a value on rewrite
1 parent 2c6b59c commit 3c8abdd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Hidden/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const Hidden = props => (
2222
* @returns {*}
2323
*/
2424
Hidden.rewriteValue = (value, values) => {
25-
if(!value.startsWith('~') || !value.endsWith('~')) return value;
25+
if(!value || !value.toString().startsWith('~') || !value.toString().endsWith('~')) return value;
2626
return Converse.calculateFormula(values, value.slice(1, -1));
2727
};
2828

0 commit comments

Comments
 (0)