Undefined check for propertyValue (#3769)

This commit is contained in:
Rajat Dabade 2022-09-02 22:49:02 +05:30 committed by GitHub
parent a6ca2c2011
commit 970fda3b1d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -19,8 +19,10 @@ type Props = {
const PropertyValueElement = (props:Props): JSX.Element => {
const {card, propertyTemplate, readOnly, showEmptyPlaceholder, board} = props
const propertyValue = card.fields.properties[propertyTemplate.id]
let propertyValue = card.fields.properties[propertyTemplate.id]
if(propertyValue === undefined) {
propertyValue = ''
}
const property = propsRegistry.get(propertyTemplate.type)
const Editor = property.Editor
return (