[MM-28973] Prevent destructuring of undefined (#4832)

* Prevent destructuring of undefined

* Do the same for thread drafts
This commit is contained in:
Miguel Alatzar 2020-09-24 10:50:42 -07:00 committed by GitHub
parent 816209b739
commit 8a5c58b39a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -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,
];

View file

@ -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,
];