Fix providerName (#2589)

Co-authored-by: Omar López <[email protected]>
This commit is contained in:
sean-brydonandOmar López authored and GitHub committed 2022-04-26 04:20:13 +00:00
1 parent fd73a4ac92
commit 9fffaa20a2
4 files changed
+6 -5

No files matched your search

+2 -2
View File
@@ -128,8 +128,8 @@ export function getLocationLabels(t: TFunction) {
}, defaultLocationLabels);
}
export function getAppName(name: string) {
return ALL_APPS_MAP[name as keyof typeof ALL_APPS_MAP]?.name || "No App Name";
export function getAppName(name: string): string | null {
return ALL_APPS_MAP[name as keyof typeof ALL_APPS_MAP]?.name ?? null;
}
export function getAppType(name: string): string {
@@ -313,7 +313,7 @@ ${getRichDescription(this.calEvent)}
}
protected getLocation(): string {
let providerName = this.calEvent.location ? getAppName(this.calEvent.location) : "";
let providerName = this.calEvent.location && getAppName(this.calEvent.location);
if (this.calEvent.location && this.calEvent.location.includes("integrations:")) {
const location = this.calEvent.location.split(":")[1];