We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 94e7914 commit 3fa5287Copy full SHA for 3fa5287
1 file changed
components/lifecycle/new-form.vue
@@ -384,7 +384,10 @@ const handleSave = async () => {
384
}
385
submitting.value = true
386
try {
387
- const currentConfig = await getBucketLifecycleConfiguration(props.bucketName)
+ let currentConfig = null
388
+ try {
389
+ currentConfig = await getBucketLifecycleConfiguration(props.bucketName)
390
+ } catch (err) {}
391
const newRule: any = {
392
ID: randomUUID(),
393
Status: 'Enabled',
@@ -427,7 +430,7 @@ const handleSave = async () => {
427
430
428
431
429
432
- const existingRules = currentConfig.Rules || []
433
+ const existingRules = currentConfig?.Rules || []
434
const payload = {
435
Rules: [...existingRules, newRule],
436
0 commit comments