Skip to content

Commit

Permalink
[FIX] demo: optional askConfirmation cancel argument
Browse files Browse the repository at this point in the history
The argument `cancel` of the method `askConfirmation` is optional,
but the function `cancel` is always called in the demo, without checking
if its defined. this lead to tracebacks if `cancel` is not defined.

closes #2274

X-original-commit: d91bf98
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
Signed-off-by: Minne Adrien (adrm) <adrm@odoo.com>
  • Loading branch information
hokolomopo committed Mar 27, 2023
1 parent bf6c3b6 commit b14ef0f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion demo/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ class Demo extends Component {
if (window.confirm(content)) {
confirm();
} else {
cancel();
cancel?.();
}
}

Expand Down

0 comments on commit b14ef0f

Please sign in to comment.