diff --git a/change/@acedatacloud-hub-220318f0-72ba-4785-806c-9bf1c847bba9.json b/change/@acedatacloud-hub-220318f0-72ba-4785-806c-9bf1c847bba9.json new file mode 100644 index 00000000..779b45bd --- /dev/null +++ b/change/@acedatacloud-hub-220318f0-72ba-4785-806c-9bf1c847bba9.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "fix bug of applying", + "packageName": "@acedatacloud/hub", + "email": "cqc@cuiqingcai.com", + "dependentChangeType": "patch" +} diff --git a/src/store/chat/actions.ts b/src/store/chat/actions.ts index 872c7943..11253707 100644 --- a/src/store/chat/actions.ts +++ b/src/store/chat/actions.ts @@ -81,7 +81,7 @@ export const getApplication = async ({ .then((response) => { state.status.getApplication = Status.Success; commit('setApplication', response.data.items[0]); - const credential = response.data.items?.[0].credentials?.find( + const credential = response.data.items?.[0]?.credentials?.find( (credential) => credential?.host === window.location.origin ); commit('setCredential', credential); diff --git a/src/store/chatdoc/actions.ts b/src/store/chatdoc/actions.ts index 6a74fe0c..4f94cfb3 100644 --- a/src/store/chatdoc/actions.ts +++ b/src/store/chatdoc/actions.ts @@ -48,7 +48,7 @@ export const getApplication = async ({ .then((response) => { state.status.getApplication = Status.Success; commit('setApplication', response.data.items[0]); - const credential = response.data.items?.[0].credentials?.find( + const credential = response.data.items?.[0]?.credentials?.find( (credential) => credential?.host === window.location.origin ); commit('setCredential', credential); diff --git a/src/store/midjourney/actions.ts b/src/store/midjourney/actions.ts index 8ba178a0..bb5f7bf0 100644 --- a/src/store/midjourney/actions.ts +++ b/src/store/midjourney/actions.ts @@ -56,7 +56,7 @@ export const getApplication = async ({ .then((response) => { state.status.getApplication = Status.Success; commit('setApplication', response.data.items[0]); - const credential = response.data.items?.[0].credentials?.find( + const credential = response.data.items?.[0]?.credentials?.find( (credential) => credential?.host === window.location.origin ); commit('setCredential', credential);