chore: repair build by removing optional chaning

pull/5752/head
Pavel Zavora 2021-05-17 08:39:40 +02:00
parent fefb450525
commit 9037c92b89
1 changed files with 5 additions and 2 deletions

View File

@ -72,8 +72,11 @@ export const getRule = async (kapacitor, ruleID) => {
method: 'GET',
url: `${kapacitor.links.rules}/${ruleID}`,
})
addUnderscoreType(response?.data?.alertNodes?.serviceNow)
addUnderscoreType(response?.data?.alertNodes?.zenoss)
const alertNodes = get(response, ['data', 'alertNodes'])
if (alertNodes) {
addUnderscoreType(alertNodes.serviceNow)
addUnderscoreType(alertNodes.zenoss)
}
return response
} catch (error) {
console.error(error)