We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5309c6b commit 593df0fCopy full SHA for 593df0f
app/code/Magento/Customer/Model/Metadata/Form/File.php
@@ -320,10 +320,10 @@ public function compactValue($value)
320
}
321
322
// Remove outdated file (in the case of file uploader UI component)
323
- if (!empty($this->_value) && !empty($value['delete'])) {
324
- $this->fileProcessor->removeUploadedFile($this->_value);
325
- return $value;
326
- } else if ($this->_entityTypeCode == 'customer' && empty($value) && !empty($this->_value)) {
+ if (!empty($this->_value)
+ && (!empty($value['delete'])
+ || ($this->_entityTypeCode == 'customer' && empty($value)))
+ ) {
327
$this->fileProcessor->removeUploadedFile($this->_value);
328
return $value;
329
0 commit comments