Fix product update with file attribute (#1190)

* Fix product update with file attribute

* Update changelog

* Fix optional chaining
This commit is contained in:
Dawid Tarasiuk 2021-06-23 13:21:13 +02:00 committed by GitHub
parent 88af20168b
commit 462723ec08
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View file

@ -53,6 +53,7 @@ All notable, unreleased changes to this project will be documented in this file.
- Fix product type translations - #1163 by @orzechdev
- Support staff only voucher - #1174 by @orzechdev
- Fix label names in reference attributes - #1184 by @orzechdev
- Fix failing product update with file attribute - #1190 by @orzechdev
# 2.11.1

View file

@ -192,8 +192,8 @@ function getFileInput(
};
}
return {
file: updatedFileAttribute.file,
id: updatedFileAttribute.id
file: attribute.data.selectedValues?.[0]?.file?.url,
id: attribute.id
};
}