[MM-47970] + [MM-47754] Downloads fixes (#2326)
* Use downloads location as default when clicking "Save as". Remove update from downloads after upgrade when application starts * Fix issue where "addedAt" was extracted from undefined object * Fix tests
This commit is contained in:
@@ -15,7 +15,7 @@ type OwnProps = {
|
||||
const FileSizeAndStatus = ({item}: OwnProps) => {
|
||||
const translate = useIntl();
|
||||
|
||||
const {totalBytes, receivedBytes, addedAt} = item;
|
||||
const {totalBytes, receivedBytes, addedAt} = item || {};
|
||||
|
||||
const getRemainingTime = useCallback(() => {
|
||||
const elapsedMs = Date.now() - addedAt;
|
||||
|
Reference in New Issue
Block a user