Merge pull request #3946 from overleaf/ae-upload-error-response

Handle undefined response in upload error handler

GitOrigin-RevId: 09c09bc353d3db3c0f5040c4d99d64fbe3ba56db
This commit is contained in:
Alf Eaton 2021-04-27 08:36:45 +01:00 committed by Copybot
parent c102bcac6c
commit 15011a9982

View file

@ -95,7 +95,7 @@ export default function FileTreeUploadDoc() {
})
// handle upload errors
.on('upload-error', (file, error, response) => {
switch (response.status) {
switch (response?.status) {
case 429:
setError('rate-limit-hit')
break