From 286719f1f2cf9095d69184ab77dd2a89cb630805 Mon Sep 17 00:00:00 2001 From: Mirco Wittrien Date: Fri, 16 Apr 2021 21:43:46 +0200 Subject: [PATCH] Update 0BDFDB.plugin.js --- Library/0BDFDB.plugin.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Library/0BDFDB.plugin.js b/Library/0BDFDB.plugin.js index d9a17ff7f4..7fa34a27e2 100644 --- a/Library/0BDFDB.plugin.js +++ b/Library/0BDFDB.plugin.js @@ -2,7 +2,7 @@ * @name BDFDB * @author DevilBro * @authorId 278543574059057154 - * @version 1.5.6 + * @version 1.5.7 * @description Required Library for DevilBro's Plugins * @invite Jx3TjNS * @donate https://www.paypal.me/MircoWittrien @@ -22,7 +22,7 @@ module.exports = (_ => { "info": { "name": "BDFDB", "author": "DevilBro", - "version": "1.5.6", + "version": "1.5.7", "description": "Required Library for DevilBro's Plugins" }, "rawUrl": `https://mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js`, @@ -2063,7 +2063,7 @@ module.exports = (_ => { if (!plugin || !BDFDB.ObjectUtils.is(module) || !methodNames || !BDFDB.ObjectUtils.is(patchMethods)) return null; patchMethods = BDFDB.ObjectUtils.filter(patchMethods, type => InternalData.ModuleUtilsConfig.PatchTypes.includes(type), true); if (BDFDB.ObjectUtils.isEmpty(patchMethods)) return null; - const pluginName = typeof plugin === "string" ? plugin : plugin.name; + const pluginName = (typeof plugin === "string" ? plugin : plugin.name) || ""; const pluginVersion = typeof plugin === "string" ? "" : plugin.version; const pluginId = pluginName.toLowerCase(); let patchPriority = !isNaN(config.priority) ? config.priority : (BDFDB.ObjectUtils.is(plugin) && !isNaN(plugin.patchPriority) ? plugin.patchPriority : 5); @@ -7921,11 +7921,10 @@ module.exports = (_ => { BDFDB.TimeUtils.clear(languageChangeTimeout); languageChangeTimeout = BDFDB.TimeUtils.timeout(_ => { for (let pluginName in PluginStores.loaded) if (PluginStores.loaded[pluginName].started) BDFDB.PluginUtils.translate(PluginStores.loaded[pluginName]); - BDFDB.PatchUtils.patch(this, LibraryModules.SettingsUtils, "updateLocalSettings", {after: translateAllNew}); }, 10000); } }; - if (LibraryModules.SettingsUtils) BDFDB.PatchUtils.patch(this, LibraryModules.SettingsUtils, "updateLocalSettings", {after: translateAllNew}); + if (LibraryModules.SettingsUtils) BDFDB.PatchUtils.patch(BDFDB, LibraryModules.SettingsUtils, "updateLocalSettings", {after: translateAllNew}); InternalBDFDB.onSettingsClosed = function () { if (InternalBDFDB.SettingsUpdated) {