diff options
author | Stefan Giehl <stefan@matomo.org> | 2020-02-18 01:33:56 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-18 01:33:56 +0300 |
commit | e8cb9c2ae10dceec3fde93acb58569bb8d9c1b59 (patch) | |
tree | 6deddcf330a3bdb3c1a1098cab170bae4f5270b4 /plugins/CoreHome/angularjs/common | |
parent | 7f95e432da0a0fb2b648a4c4bb5c42a7d004d6a8 (diff) |
Fixes some comparison issues (#15583)
* ensure new date objects are returned
* return chosen period when comparing with previous year
Diffstat (limited to 'plugins/CoreHome/angularjs/common')
-rw-r--r-- | plugins/CoreHome/angularjs/common/services/periods.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/CoreHome/angularjs/common/services/periods.js b/plugins/CoreHome/angularjs/common/services/periods.js index 9e6ba80f03..95f6f0c3dd 100644 --- a/plugins/CoreHome/angularjs/common/services/periods.js +++ b/plugins/CoreHome/angularjs/common/services/periods.js @@ -63,7 +63,7 @@ }, getDateRange: function () { - return [this.dateInPeriod, this.dateInPeriod]; + return [new Date(this.dateInPeriod.getTime()), new Date(this.dateInPeriod.getTime())]; } }; |