From 7bbef74ffebdbfc48288478b82789d012975199f Mon Sep 17 00:00:00 2001 From: Liam Fitzgerald Date: Fri, 9 Apr 2021 12:04:55 +1000 Subject: [PATCH] ShipSearch: fix error reporting Fixes urbit/landscape#753 --- pkg/interface/src/views/components/ShipSearch.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/interface/src/views/components/ShipSearch.tsx b/pkg/interface/src/views/components/ShipSearch.tsx index a33b8745bc..8cc350f1b5 100644 --- a/pkg/interface/src/views/components/ShipSearch.tsx +++ b/pkg/interface/src/views/components/ShipSearch.tsx @@ -157,7 +157,7 @@ export function ShipSearch>( setFieldValue(name(), newValue); }; - const error = _.compact(errors[id] as string[]); + const error = _.compact((_.isString(errors[id]) ? [errors[id]] : errors[id] as string[]) as any); const isExact = useCallback((s: string) => { const ship = `~${deSig(s)}`;