Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const tableState = reactive({

const getCreatedByNames = (id: string): string => {
if (id.includes('webhook')) {
return storeState.webhook[id].label || id;
return storeState.webhook[id]?.label || id;
}
return id || '--';
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ const labelMenuItemsHandler = (): AutocompleteHandler => async (inputText: strin
};
const getCreatedByNames = (id: string): string => {
if (id.includes('webhook')) {
return storeState.webhook[id].label || id;
return storeState.webhook[id]?.label || id;
}
return id;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const state = reactive({

const getEscalationPolicyLabel = (id: string): string => storeState.escalationPolicy[id]?.label || '';
const getWebhookIcon = (id: string): string|undefined => {
const webhook = storeState.webhook[id].data;
const webhook = storeState.webhook[id]?.data;
if (!webhook) return undefined;
return storeState.plugins[webhook.plugin_info.plugin_id]?.icon || '';
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ const fetchAlerts = async () => {
};
const getCreatedByNames = (id: string): string => {
if (id.includes('webhook')) {
return storeState.webhook[id].label || id;
return storeState.webhook[id]?.label || id;
}
return id;
};
Expand Down
Loading