added missing optional chain for bracket notation (#96939)

This commit is contained in:
Jean-Louis Leysens 2021-04-14 11:46:12 +02:00 committed by GitHub
parent 3a7f23efac
commit 8c8fcf16c4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -37,7 +37,7 @@ export const registerDeleteRoute = ({
// Until then we'll modify the response here.
if (
err?.meta &&
err.body?.task_failures[0]?.reason?.reason?.includes(
err.body?.task_failures?.[0]?.reason?.reason?.includes(
'Job must be [STOPPED] before deletion'
)
) {