Fix richTextcase in prepareAttributeInput (#1994)

This commit is contained in:
Michał Droń 2022-04-15 16:33:01 +02:00 committed by GitHub
parent 0f237ad2e7
commit 2130a2a3e1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -220,7 +220,15 @@ export const prepareAttributesInput = ({
attrInput.push(booleanInput);
return attrInput;
}
// for cases other than rich text and boolean
if (inputType === AttributeInputTypeEnum.RICH_TEXT) {
attrInput.push({
id: attr.id,
richText: attr.value[0]
});
return attrInput;
}
// for cases other than rich text, boolean and file
// we can skip attribute
if (!attr.value[0]) {
return attrInput;