add syntax sugar back

This commit is contained in:
yimysty
2022-08-04 17:11:26 -07:00
parent 99f9079292
commit 8daa1e0ead
5 changed files with 5 additions and 5 deletions

2
dist/index.js vendored
View File

@@ -7127,7 +7127,7 @@ class Deployment {
} }
}) })
core.info(JSON.stringify(data)) core.info(JSON.stringify(data))
const artifactRawUrl = data.value.find(artifact => artifact.name === this.artifactName).url const artifactRawUrl = data?.value?.find(artifact => artifact.name === this.artifactName)?.url
if (!artifactRawUrl) { if (!artifactRawUrl) {
throw new Error('No uploaded artifact was found! Please check if there are any errors at build step, or uploaded artifact name is correct.') throw new Error('No uploaded artifact was found! Please check if there are any errors at build step, or uploaded artifact name is correct.')
} }

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@@ -7127,7 +7127,7 @@ class Deployment {
} }
}) })
core.info(JSON.stringify(data)) core.info(JSON.stringify(data))
const artifactRawUrl = data.value.find(artifact => artifact.name === this.artifactName).url const artifactRawUrl = data?.value?.find(artifact => artifact.name === this.artifactName)?.url
if (!artifactRawUrl) { if (!artifactRawUrl) {
throw new Error('No uploaded artifact was found! Please check if there are any errors at build step, or uploaded artifact name is correct.') throw new Error('No uploaded artifact was found! Please check if there are any errors at build step, or uploaded artifact name is correct.')
} }

File diff suppressed because one or more lines are too long

View File

@@ -45,7 +45,7 @@ class Deployment {
} }
}) })
core.info(JSON.stringify(data)) core.info(JSON.stringify(data))
const artifactRawUrl = data.value.find(artifact => artifact.name === this.artifactName).url const artifactRawUrl = data?.value?.find(artifact => artifact.name === this.artifactName)?.url
if (!artifactRawUrl) { if (!artifactRawUrl) {
throw new Error('No uploaded artifact was found! Please check if there are any errors at build step, or uploaded artifact name is correct.') throw new Error('No uploaded artifact was found! Please check if there are any errors at build step, or uploaded artifact name is correct.')
} }