[FIX] website: correct owl DuplicatePageDialog props

`onDuplicate` was marked as optional while it never was. If you don't
specify it, the call to `this.props.onDuplicate();` will still be
executed and will crash:
`Uncaught Promise > this.props.onDuplicate is not a function`

Randomly spotted while reviewing PR about duplicate button in list view
related to opw-3640878. But it's not related to it.

closes odoo/odoo#147647

X-original-commit: 296feaa9aa16cdb1766ce8d2f5ae8126d74f881b
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
This commit is contained in:
Romain Derie
2023-12-28 09:40:13 +00:00
parent eaf494328b
commit 60a3e7f926
@@ -139,7 +139,7 @@ DuplicatePageDialog.template = xml`
</WebsiteDialog>
`;
DuplicatePageDialog.props = {
onDuplicate: {type: Function, optional: true},
onDuplicate: Function,
close: Function,
pageId: Number,
};