From 0db64d3562b5ad3c0d297ab43e8b6374b2f5c49d Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Wed, 9 Mar 2022 16:12:36 -0800 Subject: [PATCH] appDisplay: Fix folder loop in `_ensureDefaultFolders` In testing on Fedora, gnome-shell crashes here: JS ERROR: TypeError: DEFAULT_FOLDERS[folder] is undefined This needs to be a "for of" loop, not a "for in" loop, because `folders` is an array of the hash's keys, not the hash itself. Signed-off-by: Adam Williamson Part-of: --- js/ui/appDisplay.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js index d8d0ff4f7..821bfe3b8 100644 --- a/js/ui/appDisplay.js +++ b/js/ui/appDisplay.js @@ -1467,7 +1467,7 @@ class AppDisplay extends BaseAppView { this._folderSettings.set_strv('folder-children', folders); const { path } = this._folderSettings; - for (const folder in folders) { + for (const folder of folders) { const { name, categories, apps } = DEFAULT_FOLDERS[folder]; const child = new Gio.Settings({ schema_id: 'org.gnome.desktop.app-folders.folder',