Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

workaround for 'function iconTexture.get_names does not exist' #1385

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tocomo
Copy link

@tocomo tocomo commented Feb 5, 2021

I am playing around with a lot of AppImage based tools and this fix is the only thing that keeps dash-to-dock running. No sideeffects so far.

`Feb 05 17:39:07 ticktack gnome-shell[3912]: JS ERROR: TypeError: iconTexture.get_names is not a function
_getIconPixBuf@/home/tobias/.local/share/gnome-shell/extensions/[email protected]/appIconIndicators.js:941:61
_getColorPalette@/home/tobias/.local/share/gnome-shell/extensions/[email protected]/appIconIndicators.js:960:27
_enableBacklight@/home/tobias/.local/share/gnome-shell/extensions/[email protected]/appIconIndicators.js:216:57
update@/home/tobias/.local/share/gnome-shell/extensions/[email protected]/appIconIndicators.js:340:22
update@/home/tobias/.local/share/gnome-shell/extensions/[email protected]/appIconIndicators.js:102:23
_updateIndicatorStyle@/home/tobias/.local/share/gnome-shell/extensions/[email protected]/appIcons.js:181:25
_init@/home/tobias/.local/share/gnome-shell/extensions/[email protected]/appIcons.js:92:14
_createAppItem@/home/tobias/.local/share/gnome-shell/extensions/[email protected]/dash.js:479:23
_redisplay@/home/tobias/.local/share/gnome-shell/extensions/[email protected]/dash.js:809:36
_runDeferredWork@resource:///org/gnome/shell/ui/main.js:693:31
_runAllDeferredWork@resource:///org/gnome/shell/ui/main.js:702:25
queueDeferredWork/_deferredTimeoutId<@resource:///org/gnome/shell/ui/main.js:783:13

@tocomo
Copy link
Author

tocomo commented Feb 5, 2021

@tocomo tocomo changed the title workaround for function iconTexture.get_names does not exist workaround for 'function iconTexture.get_names does not exist' Feb 6, 2021
Comment on lines +941 to +948
// sometime function iconTexture.get_names does not exist: JS ERROR: TypeError: iconTexture.get_names is not a function
if (iconTexture.get_names) {
let icon_info = themeLoader.lookup_icon(iconTexture.get_names()[0], DOMINANT_COLOR_ICON_SIZE, 0);
if (icon_info !== null)
return icon_info.load_icon();
else
return null;
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can just early:

if (!iconTexture.get_names)
    return null;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants