diff --git a/src/store/modules/profile.ts b/src/store/modules/profile.ts index f1bbf59a..4fd4b200 100644 --- a/src/store/modules/profile.ts +++ b/src/store/modules/profile.ts @@ -163,7 +163,7 @@ export const profileStore = defineStore({ return res.data; }, async getSegmentSpans(params: { segmentId: string }) { - if (!params.segmentId) { + if (!(params && params.segmentId)) { return new Promise((resolve) => resolve({})); } const res: AxiosResponse = await graphql.query("queryProfileSegment").params(params); diff --git a/src/views/dashboard/related/profile/components/SegmentList.vue b/src/views/dashboard/related/profile/components/SegmentList.vue index 9992d9b1..ec4b9a60 100644 --- a/src/views/dashboard/related/profile/components/SegmentList.vue +++ b/src/views/dashboard/related/profile/components/SegmentList.vue @@ -58,6 +58,7 @@ limitations under the License. --> const key = computed( () => (profileStore.currentSegment && + profileStore.currentSegment.spans && profileStore.currentSegment.spans.length && profileStore.currentSegment.spans[0].segmentId) || "", diff --git a/src/views/dashboard/related/profile/components/Stack/Item.vue b/src/views/dashboard/related/profile/components/Stack/Item.vue index 26c08999..9341f4d5 100644 --- a/src/views/dashboard/related/profile/components/Stack/Item.vue +++ b/src/views/dashboard/related/profile/components/Stack/Item.vue @@ -14,7 +14,10 @@ See the License for the specific language governing permissions and limitations under the License. -->