[IMP] web: make the close props of FileViewer not required

Purpose
=======
In the documents modules, we don't need to give the close props,
and so instead of giving a dummy method, we make it non-required here.

Task-3290796

closes odoo/odoo#126633

Related: odoo/enterprise#40441
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
This commit is contained in:
std-odoo
2023-06-28 17:40:57 +02:00
parent d32ba1a55e
commit 067f9255a6
@@ -25,7 +25,7 @@ import { useService } from "@web/core/utils/hooks";
export class FileViewer extends Component {
static template = "web.FileViewer";
static components = {};
static props = ["files", "startIndex", "close", "modal?"];
static props = ["files", "startIndex", "close?", "modal?"];
static defaultProps = {
modal: true,
};
@@ -64,7 +64,7 @@ export class FileViewer extends Component {
}
close() {
this.props.close();
this.props.close && this.props.close();
}
next() {