From 7b69faecb42665ff643ed1e041c7fafa8e4c9f39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Strau=C3=9F?= Date: Fri, 5 Feb 2021 17:49:26 +0100 Subject: [PATCH] workaround for function iconTexture.get_names does not exist --- appIconIndicators.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/appIconIndicators.js b/appIconIndicators.js index d543d1f49..56eaa55a8 100644 --- a/appIconIndicators.js +++ b/appIconIndicators.js @@ -938,11 +938,14 @@ var DominantColorExtractor = class DashToDock_DominantColorExtractor { } // Get the pixel buffer from the icon theme - 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; + // 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; + } } /**