[FIX] qweb: do not capture current qweb instance in closure

it is not needed, and has a bad effect on globally registered templates.
This commit is contained in:
Géry Debongnie
2019-09-12 23:22:55 +02:00
parent 6bf70f016c
commit c9910077a4
3 changed files with 24 additions and 1 deletions
+1 -1
View File
@@ -241,7 +241,7 @@ export class QWeb extends EventBus {
this._processTemplate(elem);
const template = {
elem,
fn: (context, extra) => {
fn: function (this: QWeb, context, extra) {
const compiledFunction = this._compile(name, elem);
template.fn = compiledFunction;
return compiledFunction.call(this, context, extra);