mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[FIX] portal: do not crash in dev mode
Before this commit, the props validation would fail in dev mode because it did not expect a slot prop.
This commit is contained in:
committed by
Mathieu Duckerts-Antoine
parent
0b1c4dd4ef
commit
4542171a31
@@ -67,6 +67,27 @@ exports[`Portal basic use of portal 1`] = `
|
||||
}"
|
||||
`;
|
||||
|
||||
exports[`Portal basic use of portal in dev mode 1`] = `
|
||||
"function anonymous(bdom, helpers
|
||||
) {
|
||||
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
||||
|
||||
let block1 = createBlock(\`<div><span>1</span><block-child-0/></div>\`);
|
||||
let block2 = createBlock(\`<p>2</p>\`);
|
||||
|
||||
function slot1(ctx, node, key = \\"\\") {
|
||||
return block2();
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const props2 = {target: '#outside',slots: {'default': {__render: slot1, __ctx: ctx}}}
|
||||
helpers.validateProps(\`Portal\`, props2, ctx)
|
||||
let b3 = component(\`Portal\`, props2, key + \`__3\`, node, ctx);
|
||||
return block1([], [b3]);
|
||||
}
|
||||
}"
|
||||
`;
|
||||
|
||||
exports[`Portal conditional use of Portal (with sub Component) 1`] = `
|
||||
"function anonymous(bdom, helpers
|
||||
) {
|
||||
|
||||
Reference in New Issue
Block a user