[MM-28973] Prevent destructuring of undefined (#4832)
* Prevent destructuring of undefined * Do the same for thread drafts
This commit is contained in:
parent
816209b739
commit
8a5c58b39a
2 changed files with 2 additions and 2 deletions
|
|
@ -62,7 +62,7 @@ function handleSetTempUploadFileForPostDraft(state, action) {
|
|||
|
||||
const tempFiles = action.clientIds.map((temp) => ({...temp, loading: true}));
|
||||
const files = [
|
||||
...state[action.channelId].files,
|
||||
...state[action.channelId]?.files || [],
|
||||
...tempFiles,
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ function handleSetTempUploadFilesForPostDraft(state, action) {
|
|||
|
||||
const tempFiles = action.clientIds.map((temp) => ({...temp, loading: true}));
|
||||
const files = [
|
||||
...state[action.rootId].files,
|
||||
...state[action.rootId]?.files || [],
|
||||
...tempFiles,
|
||||
];
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue