Skip to content

Commit 476c1f9

Browse files
committed
fix(cdn): cdn domain not exist when deleting
1 parent 6869aee commit 476c1f9

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/baas/cdn/index.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,13 @@ class Cdn {
205205

206206
// need circle for deleting, after domain status is 6, then we can delete it
207207
console.log(`Start removing CDN for ${domain}`)
208-
const { Status } = await getCdnByDomain(this.capi, domain)
208+
const detail = await getCdnByDomain(this.capi, domain)
209+
if (!detail) {
210+
console.log(`CDN domain ${domain} not exist`)
211+
return {}
212+
}
213+
214+
const { Status } = detail
209215

210216
if (Status === 'online') {
211217
// disable first

0 commit comments

Comments
 (0)