Skip to content

Commit

Permalink
fix: set correct value to isNewField const
Browse files Browse the repository at this point in the history
  • Loading branch information
glaubersilva committed Aug 23, 2023
1 parent a06c08d commit 7283751
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const generateEmailTag = (fieldName, storeAsDonorMeta) => {
function FieldSettingsEdit({attributes, setAttributes, fieldSettings}) {
const validateFieldName = useFieldNameValidator();
const [hasFieldNameAttribute, setHasFieldNameAttribute] = useState(attributes.hasOwnProperty('fieldName'));
const [isNewField] = useState(hasFieldNameAttribute);
const [isNewField] = useState(!hasFieldNameAttribute);

const updateFieldName = useCallback(
(newFieldName = null, bumpUniqueness = false) => {
Expand Down

0 comments on commit 7283751

Please sign in to comment.