[FIX] qweb: fix crash with ref an component in same slot

This commit is contained in:
Samuel Degueldre
2021-11-10 09:13:17 +01:00
committed by Géry Debongnie
parent c718d8e6c6
commit 3e70b17da1
4 changed files with 55 additions and 2 deletions
@@ -41,7 +41,7 @@ exports[`refs refs are properly bound in slots 2`] = `
let block1 = createBlock(\`<div><span class=\\"counter\\"><block-text-0/></span><block-child-0/></div>\`);
let block2 = createBlock(\`<button block-handler-0=\\"click\\" block-ref=\\"1\\">do something</button>\`);
const slot3 = ctx => node => {
const slot3 = ctx => (node, key) => {
const refs = ctx.__owl__.refs
let d2 = [ctx, 'doSomething'];
let d3 = (el) => refs[\`myButton\`] = el;