🐛 fix(formModal): handle case when chatKey is undefined to prevent error
This commit is contained in:
parent
8b77cf5504
commit
eecefdb235
1 changed files with 2 additions and 0 deletions
|
|
@ -554,6 +554,8 @@ export default function FormModal({
|
||||||
setChatValue={(value) => {
|
setChatValue={(value) => {
|
||||||
setChatValue(value);
|
setChatValue(value);
|
||||||
setTabsState((old) => {
|
setTabsState((old) => {
|
||||||
|
// chatKey is undefined when there are no chat input keys
|
||||||
|
if (!chatKey) return old;
|
||||||
let newTabsState = _.cloneDeep(old);
|
let newTabsState = _.cloneDeep(old);
|
||||||
newTabsState[id.current].formKeysData.input_keys[
|
newTabsState[id.current].formKeysData.input_keys[
|
||||||
chatKey
|
chatKey
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue