Skip to content

Commit

Permalink
fix(projects): Missing default value for tab icon
Browse files Browse the repository at this point in the history
  • Loading branch information
Azir-11 committed Feb 23, 2024
1 parent 3bdcbc7 commit 72a4679
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/store/modules/tab/shared.ts
Expand Up @@ -81,8 +81,8 @@ export function getTabByRoute(route: App.Global.TabRoute) {
*/
export function getRouteIcons(route: App.Global.TabRoute) {
// Set default value for icon at the beginning
let icon: string = import.meta.env.VITE_MENU_ICON;
let localIcon: string | undefined;
let icon: string = route?.meta?.icon || import.meta.env.VITE_MENU_ICON;
let localIcon: string | undefined = route?.meta?.localIcon;

// Route.matched only appears when there are multiple matches,so check if route.matched exists
if (route.matched) {
Expand Down

0 comments on commit 72a4679

Please sign in to comment.