diff --git a/ags/scripts/apps.ts b/ags/scripts/apps.ts index 2d1cb7b..19a8820 100644 --- a/ags/scripts/apps.ts +++ b/ags/scripts/apps.ts @@ -36,6 +36,8 @@ export function getAppsByName(appName: string): (Array|un } export function getIconByAppName(appName: string): (string|undefined) { + if(!appName) return undefined; + if(Astal.Icon.lookup_icon(appName)) return appName; @@ -54,6 +56,8 @@ export function getIconByAppName(appName: string): (string|undefined) { } export function getAppIcon(app: (string|AstalApps.Application)): (string|undefined) { + if(!app) return undefined; + if(typeof app === "string") return getIconByAppName(app);