mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[FIX] qweb/component: do not call handlers for unmounted components
Unmounted components should be considered inactive, at least from the perspective of Owl itself. closes #543
This commit is contained in:
@@ -41,7 +41,7 @@ QWeb.addDirective({
|
||||
return "";
|
||||
});
|
||||
let params = extraArgs ? `owner, ${ctx.formatExpression(extraArgs)}` : "owner";
|
||||
let handler = `function (e) {`;
|
||||
let handler = `function (e) {if (!context.__owl__.isMounted){return}`;
|
||||
handler += mods
|
||||
.map(function(mod) {
|
||||
return MODS_CODE[mod];
|
||||
|
||||
Reference in New Issue
Block a user