Skip to content

Commit c812b21

Browse files
authored
fix: Return empty string for undefined template values (#5267)
1 parent 57b1738 commit c812b21

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

js/utils/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ let format = (str, data) => {
143143
x = x[v];
144144
});
145145

146-
return x;
146+
return x === undefined ? "" : x;
147147
});
148148

149149
return str.replace(/{_([a-zA-Z0-9]+)}/g, (match, item) => {

0 commit comments

Comments
 (0)