From e0bb81cbb69db554c2e82a666ec2a38a4ee3c2c1 Mon Sep 17 00:00:00 2001 From: nabaonan Date: Mon, 19 Jul 2021 10:42:30 +0800 Subject: [PATCH] fix: option.tag undefined cause select error --- src/components/select/select.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/select/select.vue b/src/components/select/select.vue index 16393da1..c8f8b082 100644 --- a/src/components/select/select.vue +++ b/src/components/select/select.vue @@ -119,7 +119,7 @@ const findOptionsInVNode = (node) => { const opts = node.componentOptions; - if (opts && opts.tag.match(optionRegexp)) return [node]; + if (opts && optionRegexp.test(opts.tag)) return [node]; if (!node.children && (!opts || !opts.children)) return []; const children = [...(node.children || []), ...(opts && opts.children || [])]; const options = children.reduce( @@ -464,7 +464,7 @@ const cOptions = option.componentOptions; if (!cOptions) continue; - if (cOptions.tag.match(optionGroupRegexp)){ + if (optionGroupRegexp.test(cOptions.tag)){ let children = cOptions.children; // remove filtered children