Refactor ZenWorkspaces to fix icon mapping issue

This commit is contained in:
mauro-balades 2024-09-27 18:56:37 +02:00
parent 9ae3de71e7
commit 7af14f1484

View file

@ -127,7 +127,7 @@ var ZenWorkspaces = {
} }
}, },
_kIcons: JSON.parse(Services.prefs.getStringPref("zen.workspaces.icons")).map((icon) => icon), _kIcons: JSON.parse(Services.prefs.getStringPref("zen.workspaces.icons")).map((icon) => Array.from(icon)[0]),
_initializeWorkspaceCreationIcons() { _initializeWorkspaceCreationIcons() {
let container = document.getElementById('PanelUI-zen-workspaces-create-icons-container'); let container = document.getElementById('PanelUI-zen-workspaces-create-icons-container');
@ -248,7 +248,7 @@ var ZenWorkspaces = {
if (this.workspaceHasIcon(workspace)) { if (this.workspaceHasIcon(workspace)) {
return workspace.icon; return workspace.icon;
} }
return workspace.name[0].toUpperCase(); return Array.from(workspace.name)[0].toUpperCase();
}, },
get shouldShowContainers() { get shouldShowContainers() {