From 2b2d08599231f4edb7817c977bec03d90ec056ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8F=A4=E6=B5=B7=E6=AC=A2?= Date: Thu, 27 Aug 2020 19:28:03 +0800 Subject: [PATCH] fix(popper): should check nested Fragment --- packages/popper/src/usePopper.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/popper/src/usePopper.ts b/packages/popper/src/usePopper.ts index 4d1dd94076..c5f3aa2cad 100644 --- a/packages/popper/src/usePopper.ts +++ b/packages/popper/src/usePopper.ts @@ -27,17 +27,18 @@ const getTrigger = () => { // SubTree is formed by // So that the trigger element is within the slot, we need to take it out of the slot in order to attach // events on top of it - const targetSlot = children[0] + let targetSlot = children[0] if (targetSlot.length > 1) { console.warn('Popper will only be attached to the first child') } // This indicates if the slot is rendered with directives (e.g. v-if) or templates (e.g.