Skip to content

Commit 18d9551

Browse files
committed
Fix cannot read properties of undefined (reading 'parsed') error
1 parent a4d3859 commit 18d9551

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/utils/alerts-map.mts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ export async function getAlertsMapFromPurls(
8585
}
8686
const sockSdk = sockSdkCResult.data
8787
const socketYmlResult = findSocketYmlSync()
88-
const socketYml = socketYmlResult.ok
89-
? (socketYmlResult.data as FoundSocketYml).parsed
88+
const socketYml = socketYmlResult.ok && socketYmlResult.data
89+
? socketYmlResult.data.parsed
9090
: undefined
9191

9292
const alertsMapOptions = {

0 commit comments

Comments
 (0)