diff --git a/src/renderer/pages/picbeds/index.vue b/src/renderer/pages/picbeds/index.vue index 0317871..47acb44 100644 --- a/src/renderer/pages/picbeds/index.vue +++ b/src/renderer/pages/picbeds/index.vue @@ -241,6 +241,10 @@ async function handleCopyApi () { const uploader = await getConfig('uploader') as IStringKeyMap || {} const picBedConfigList = uploader[$route.params.type as string].configList || [] const picBedConfig = picBedConfigList.find((item: IUploaderConfigListItem) => item._id === $route.params.configId) + if (!picBedConfig) { + ElMessage.error('No config found') + return + } const apiUrl = `http://${host}:${port}/upload?picbed=${$route.params.type}&configName=${picBedConfig?._configName}` clipboard.writeText(apiUrl) ElMessage.success($T('MANAGE_BUCKET_COPY_SUCCESS') + ' ' + apiUrl)