Fix err may be undefined

This commit is contained in:
Zhiyuan Zheng 2021-12-31 12:26:17 +01:00
parent 248238dda8
commit d5ea813ebe
1 changed files with 2 additions and 2 deletions

View File

@ -15,8 +15,8 @@ const composePost = async (
method: 'get',
url: `statuses/${composeState.replyToStatus.id}`
})
} catch (err) {
if (err.status && err.status == 404) {
} catch (err: any) {
if (err && err.status && err.status == 404) {
return Promise.reject({ removeReply: true })
}
}