Skip to content

Commit

Permalink
fix(feedback): Added error handling on callback function (#816)
Browse files Browse the repository at this point in the history
  • Loading branch information
yashoswalyo authored Dec 19, 2023
1 parent 135ee5a commit a05b7ea
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/opc-feedback/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/opc-feedback/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@one-platform/opc-feedback",
"version": "0.1.0-alpha",
"version": "0.1.1-alpha",
"description": "opc-feedback component follows the One Platform design system and can be used as a popup to collect feedback from the end-users.",
"scripts": {
"dev": "webpack serve",
Expand Down
10 changes: 7 additions & 3 deletions packages/opc-feedback/src/opc-feedback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,13 @@ export class OpcFeedback extends LitElement {
},
});
this.dispatchEvent(event);
await this.onSubmit?.(event);
this._resetForm();
this._setModalState(false, false, false, !this._openConfirmationModal);
try {
await this.onSubmit?.(event);
this._resetForm();
this._setModalState(false, false, false, !this._openConfirmationModal);
} catch (err) {
console.error(err);
}
}

toggle() {
Expand Down

0 comments on commit a05b7ea

Please sign in to comment.