[FIX] web_refresher: Define displayRefresher in setup instead of using a getter

Before this changes whe trying to access to a view with the refresher,
in mobile view, an error was thrown.

As it is not necessary to define the value in a get function, defining
the value in the setup solves the problem.
pull/2891/head
Carlos Roca 2024-07-24 07:07:55 +02:00
parent acbeaf4575
commit fc03b2d0b9
1 changed files with 3 additions and 6 deletions

View File

@ -24,11 +24,8 @@ patch(ControlPanel.prototype, "web_refresher.ControlPanel", {
searchModel: this.env.searchModel,
pagerProps: this.pagerProps,
};
},
/**
* @returns {Boolean}
*/
get displayRefresher() {
return !this.forbiddenSubTypes.includes(this.env.config.viewSubType);
this.displayRefresher = !this.forbiddenSubTypes.includes(
this.env.config.viewSubType
);
},
});