From f9e183d60da8f3b1aa9981caf732919f1bb3faec Mon Sep 17 00:00:00 2001 From: Mirco Wittrien Date: Fri, 20 Dec 2019 14:18:39 +0100 Subject: [PATCH] Update ServerFolders.plugin.js --- Plugins/ServerFolders/ServerFolders.plugin.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Plugins/ServerFolders/ServerFolders.plugin.js b/Plugins/ServerFolders/ServerFolders.plugin.js index 00647b8f6c..6d97a65219 100644 --- a/Plugins/ServerFolders/ServerFolders.plugin.js +++ b/Plugins/ServerFolders/ServerFolders.plugin.js @@ -136,7 +136,7 @@ class ServerFolders { children: this.props.folders.map(folderId => { let folder = BDFDB.LibraryModules.FolderStore.getGuildFolderById(folderId); let data = plugin.getFolderConfig(folderId); - return folder.guildIds.map(guildId => { + return folder ? folder.guildIds.map(guildId => { return [ this.draggedGuild == guildId ? null : BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.GuildComponents.Guild, { guild: BDFDB.LibraryModules.GuildStore.getGuild(guildId), @@ -221,8 +221,8 @@ class ServerFolders { }) }) ] - }); - }).reduce((r, a) => r.concat(a, BDFDB.DataUtils.get(plugin, "settings", "addSeparators") ? BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.GuildComponents.Separator, {}) : null), [0]).slice(1, -1).flat(10).filter(n => n) + }) : null; + }).filter(n => n).reduce((r, a) => r.concat(a, BDFDB.DataUtils.get(plugin, "settings", "addSeparators") ? BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.GuildComponents.Separator, {}) : null), [0]).slice(1, -1).flat(10).filter(n => n) }) }); }