From cd9e67c9dfdfb6f46b7a58267b5f6cf4ffe84642 Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Thu, 21 Mar 2024 11:58:00 -0700 Subject: [PATCH] Resolve search select. --- .../vendor-search-select/vendor-search-select.component.jsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/client/src/components/vendor-search-select/vendor-search-select.component.jsx b/client/src/components/vendor-search-select/vendor-search-select.component.jsx index a190d08a5..dbc588137 100644 --- a/client/src/components/vendor-search-select/vendor-search-select.component.jsx +++ b/client/src/components/vendor-search-select/vendor-search-select.component.jsx @@ -36,9 +36,8 @@ const VendorSearchSelect = ( width: '100%', }} labelRender={({ label, value, ...rest }) => { - console.log(value, label, rest); - if (!value) return label; - const discount = options.find((o) => o.id === value)?.discount; + if (!value || !options) return label; + const discount = options?.find((o) => o.id === value)?.discount; return (
{label}