🐛 fix(chatComponent): add null check for formKeysData.input_keys to prevent error when accessing undefined property
This commit is contained in:
parent
16666426f7
commit
bd7489206d
1 changed files with 6 additions and 1 deletions
|
|
@ -58,7 +58,12 @@ export default function Chat({ flow }: ChatType) {
|
||||||
) {
|
) {
|
||||||
setIsBuilt(false);
|
setIsBuilt(false);
|
||||||
}
|
}
|
||||||
if (tabsState && tabsState[flow.id] && tabsState[flow.id].formKeysData) {
|
if (
|
||||||
|
tabsState &&
|
||||||
|
tabsState[flow.id] &&
|
||||||
|
tabsState[flow.id].formKeysData &&
|
||||||
|
tabsState[flow.id].formKeysData.input_keys !== null
|
||||||
|
) {
|
||||||
setCanOpen(true);
|
setCanOpen(true);
|
||||||
} else {
|
} else {
|
||||||
setCanOpen(false);
|
setCanOpen(false);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue