From 2eea3786c4b11d64416cf798f68ef5f5c99736c7 Mon Sep 17 00:00:00 2001 From: Mirco Wittrien Date: Sun, 7 Feb 2021 22:36:14 +0100 Subject: [PATCH] Update CustomStatusPresets.plugin.js --- Plugins/CustomStatusPresets/CustomStatusPresets.plugin.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Plugins/CustomStatusPresets/CustomStatusPresets.plugin.js b/Plugins/CustomStatusPresets/CustomStatusPresets.plugin.js index 14f1a51f3e..1456179bb7 100644 --- a/Plugins/CustomStatusPresets/CustomStatusPresets.plugin.js +++ b/Plugins/CustomStatusPresets/CustomStatusPresets.plugin.js @@ -149,7 +149,8 @@ module.exports = (_ => { document.removeEventListener("mouseup", mouseUp); let dragging = event3 => { this.updateDragPreview(event3); - let hoveredId = BDFDB.DOMUtils.getParent(BDFDB.dotCN._customstatuspresetssortablecard, event3.target)?.getAttribute("cardId"); + let hoveredId = BDFDB.DOMUtils.getParent(BDFDB.dotCN._customstatuspresetssortablecard, event3.target); + hoveredId = hoveredId && hoveredId.getAttribute("cardId"); let update = hoveredId != this.props.hovered; this.props.hovered = hoveredId; if (update) BDFDB.ReactUtils.forceUpdate(this); @@ -511,4 +512,4 @@ module.exports = (_ => { } }; })(window.BDFDB_Global.PluginUtils.buildPlugin(config)); -})(); \ No newline at end of file +})();