From 2a85a989df0946f1946c486f235717d6c8c400b2 Mon Sep 17 00:00:00 2001 From: Lei OT Date: Mon, 6 Nov 2023 16:43:25 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=9D=A5=E6=BA=90=E5=A4=9A=E9=80=89?= =?UTF-8?q?=E7=9A=84=E9=BB=98=E8=AE=A4=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/search/SiteSelect.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/search/SiteSelect.jsx b/src/components/search/SiteSelect.jsx index d4595ad..fd52f75 100644 --- a/src/components/search/SiteSelect.jsx +++ b/src/components/search/SiteSelect.jsx @@ -13,7 +13,7 @@ class SiteSelect extends Component { const { store, mode, value, onChange, show_all, ...extProps } = this.props; const _mode = mode || store?.group_select_mode || null; const _show_all = ['tags', 'multiple'].includes(_mode) ? false : show_all; - const __value = ['tags', 'multiple'].includes(_mode) ? (value.constructor === Object ? [value] : value) : undefined; + const __value = ['tags', 'multiple'].includes(_mode) ? (value?.constructor === Object ? [value] : value) : undefined; const _value = !['tags', 'multiple'].includes(_mode) ? value || store?.webcode || undefined : (__value || store?.webcode || []).filter((item) => String(item?.value || item.key).toLowerCase() !== 'all');