Hey, when I try to edit and save a stream comment, it throws me this error.
Uncaught TypeError: Cannot read properties of undefined (reading 'then')
at o.actionSave (espo-main.js:36313:21)
at Object.handleAction (espo-main.js:5070:22)
at s.onClick (espo-main.js:20055:22)
at HTMLButtonElement.<anonymous> (espo-main.js:14512:38)
at HTMLButtonElement.dispatch (jquery.js:5146:27)
at f.handle (jquery.js:4950:28)
The above error points towards the "editView.save().then(() => {//code//})" line present in the core function "actionSave" { espocrm/client/src/views/modals/edit.js }.
EditView variable contains valid data. It seems like there's some problem with the "then" function, because of this error, the dialog box fails to close.
If I overwrite the same function in some custom file, remove the "then" function, and copy-paste the rest of the code after the save function, it works fine. It looks something like this after my changes -> "editView.save(); //code//".
Please let know me know the use of this "then" function and why is throwing error.
Uncaught TypeError: Cannot read properties of undefined (reading 'then')
at o.actionSave (espo-main.js:36313:21)
at Object.handleAction (espo-main.js:5070:22)
at s.onClick (espo-main.js:20055:22)
at HTMLButtonElement.<anonymous> (espo-main.js:14512:38)
at HTMLButtonElement.dispatch (jquery.js:5146:27)
at f.handle (jquery.js:4950:28)
The above error points towards the "editView.save().then(() => {//code//})" line present in the core function "actionSave" { espocrm/client/src/views/modals/edit.js }.
EditView variable contains valid data. It seems like there's some problem with the "then" function, because of this error, the dialog box fails to close.
If I overwrite the same function in some custom file, remove the "then" function, and copy-paste the rest of the code after the save function, it works fine. It looks something like this after my changes -> "editView.save(); //code//".
Please let know me know the use of this "then" function and why is throwing error.
Comment