wallpaper selector: fix thumbnail generation (#1978, #1902)

This commit is contained in:
end-4
2025-09-17 11:35:42 +02:00
parent cf4aa1256d
commit b984d6794e
2 changed files with 6 additions and 3 deletions
@@ -10,7 +10,9 @@ Singleton {
* @returns {string}
*/
function trimFileProtocol(str) {
return str.startsWith("file://") ? str.slice(7) : str;
let s = str;
if (typeof s !== "string") s = str.toString(); // Convert to string if it's an url or whatever
return s.startsWith("file://") ? s.slice(7) : s;
}
/**