From 36ff5daa543055fe7ac60df5f9eaad05346145c5 Mon Sep 17 00:00:00 2001 From: Thaum Rystra <9525416+ThaumRystra@users.noreply.github.com> Date: Wed, 5 Jun 2024 17:10:44 +0200 Subject: [PATCH] Fixed bug with select-outside throwing error for undefined elements --- .../ui/tabletop/selectedCreatureBar/SelectedCreatureBar.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/imports/client/ui/tabletop/selectedCreatureBar/SelectedCreatureBar.vue b/app/imports/client/ui/tabletop/selectedCreatureBar/SelectedCreatureBar.vue index 7b16f42f..fe3a05e7 100644 --- a/app/imports/client/ui/tabletop/selectedCreatureBar/SelectedCreatureBar.vue +++ b/app/imports/client/ui/tabletop/selectedCreatureBar/SelectedCreatureBar.vue @@ -123,6 +123,7 @@ import Creatures from '/imports/api/creature/creatures/Creatures'; import CreatureProperties from '/imports/api/creature/creatureProperties/CreatureProperties'; import TabletopActionCard from '/imports/client/ui/tabletop/TabletopActionCard.vue'; import CreatureBarIcon from '/imports/client/ui/tabletop/selectedCreatureBar/CreatureBarIcon.vue'; +import { compact } from 'lodash'; //import TabletopPortrait from '/imports/client/ui/tabletop/selectedCreatureBar/TabletopPortrait.vue'; //import TabletopBuffIcons from '/imports/client/ui/tabletop/selectedCreatureBar/TabletopBuffIcons.vue'; @@ -221,10 +222,10 @@ export default { this.menuOpen = false; }, menuClickOutsideInclude() { - return [ + return compact([ document.querySelector('.selected-creature-bar'), document.querySelector('.tabletop-prop-menu') - ]; + ]); }, openCharacterSheet(tab, elementId) { this.$store.commit(