Skip to content

Commit 411b323

Browse files
author
Michael Dijkstra
committed
Fix widget stuck in open state
1 parent 2165ae9 commit 411b323

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/hooks/useChat.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,10 @@ const useChat = (
8888

8989
if (open) {
9090
chatProvider.open()
91-
setState('open')
91+
if (state !== 'complete') setState('open')
9292
}
9393
},
94-
[]
94+
[state]
9595
)
9696

9797
return [state, loadChat]

0 commit comments

Comments
 (0)