From cd93c942faae3789c715a8532a4224055cfeb331 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Thu, 12 Mar 2020 15:56:07 +0100 Subject: [PATCH] Fix error template.index is undefined in timesheet --- timesheet/js/app.js | 2 +- timesheet/js/app.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/timesheet/js/app.js b/timesheet/js/app.js index 06ac07b75b..740b2e6726 100644 --- a/timesheet/js/app.js +++ b/timesheet/js/app.js @@ -53,7 +53,7 @@ var TimesheetApp = /** @class */ (function (_super) { TimesheetApp.prototype.et2_ready = function (et2, name) { // call parent _super.prototype.et2_ready.call(this, et2, name); - if (typeof et2.templates['timesheet.index'] != "undefined") { + if (name == 'timesheet.index') { this.filter_change(); this.filter2_change(); } diff --git a/timesheet/js/app.ts b/timesheet/js/app.ts index 2b8ebc6bdd..dd0f2fc102 100644 --- a/timesheet/js/app.ts +++ b/timesheet/js/app.ts @@ -41,7 +41,7 @@ class TimesheetApp extends EgwApp // call parent super.et2_ready(et2, name); - if (typeof et2.templates['timesheet.index'] != "undefined") + if (name == 'timesheet.index') { this.filter_change(); this.filter2_change();