appDisplay: Don't crash if app is missing categories
g_desktop_app_info_get_categories() may return null. In that case, the previous code would fail to create a folder when dragging an app with no categories onto another app. Instead, simply continue with the next app info. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/782
This commit is contained in:
parent
055c007ac2
commit
0732e1426a
@ -98,7 +98,10 @@ function _findBestFolderName(apps) {
|
||||
let commonCategories = [];
|
||||
|
||||
appInfos.reduce((categories, appInfo) => {
|
||||
for (let category of appInfo.get_categories().split(';')) {
|
||||
const appCategories = appInfo.get_categories();
|
||||
if (!appCategories)
|
||||
return categories;
|
||||
for (let category of appCategories.split(';')) {
|
||||
if (!(category in categoryCounter))
|
||||
categoryCounter[category] = 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user