Skip to content

Commit

Permalink
Popover: fix reference error in the loop (#11503)
Browse files Browse the repository at this point in the history
* Popover: fix reference error in the loop

* Update directive.js
  • Loading branch information
akifo authored and ziyoung committed Jun 8, 2018
1 parent 3593181 commit db928de
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/popover/src/directive.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ const getReference = (el, binding, vnode) => {
const _ref = binding.expression ? binding.value : binding.arg;
const popper = vnode.context.$refs[_ref];
if (popper) {
popper.$refs.reference = el;
if (Array.isArray(popper)) {
popper[0].$refs.reference = el;
} else {
popper.$refs.reference = el;
}
}
};

Expand Down

0 comments on commit db928de

Please sign in to comment.