diff --git a/pkg/interface/src/views/apps/chat/ChatResource.tsx b/pkg/interface/src/views/apps/chat/ChatResource.tsx index 8fad13168..e4f02840c 100644 --- a/pkg/interface/src/views/apps/chat/ChatResource.tsx +++ b/pkg/interface/src/views/apps/chat/ChatResource.tsx @@ -75,7 +75,14 @@ export function ChatResource(props: ChatResourceProps) { ); const clearUnsent = useCallback( - () => setUnsent(s => _.omit(s, station)), + () => { + setUnsent(s => { + if(station in s) { + return _.omit(s, station); + } + return s; + }); + }, [station] );