Skip to content

Commit

Permalink
Added undefined check to text prop transformation.
Browse files Browse the repository at this point in the history
  • Loading branch information
michielvandergeest committed Oct 19, 2023
1 parent 1433b42 commit dda6030
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/element.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ const transformations = {
props.rotation = props.rotation * (Math.PI / 180)
},
text(props) {
props.text = props.text?.toString()
props.text = props.text !== undefined && props.text.toString()
},
textureColor(props) {
if (!('color' in props)) {
Expand Down

0 comments on commit dda6030

Please sign in to comment.