Skip to content

Commit 3fa5287

Browse files
committed
fix: Lifecycle compatibility with S3API rustfs/rustfs#1124
1 parent 94e7914 commit 3fa5287

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

components/lifecycle/new-form.vue

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,10 @@ const handleSave = async () => {
384384
}
385385
submitting.value = true
386386
try {
387-
const currentConfig = await getBucketLifecycleConfiguration(props.bucketName)
387+
let currentConfig = null
388+
try {
389+
currentConfig = await getBucketLifecycleConfiguration(props.bucketName)
390+
} catch (err) {}
388391
const newRule: any = {
389392
ID: randomUUID(),
390393
Status: 'Enabled',
@@ -427,7 +430,7 @@ const handleSave = async () => {
427430
}
428431
}
429432
430-
const existingRules = currentConfig.Rules || []
433+
const existingRules = currentConfig?.Rules || []
431434
const payload = {
432435
Rules: [...existingRules, newRule],
433436
}

0 commit comments

Comments
 (0)