mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-01-18 18:38:07 +00:00
Fallback to eqeq for PingChart.vue
This commit is contained in:
parent
410805052e
commit
a12dffd1bc
1 changed files with 5 additions and 2 deletions
|
@ -217,7 +217,9 @@ export default {
|
||||||
watch: {
|
watch: {
|
||||||
// Update chart data when the selected chart period changes
|
// Update chart data when the selected chart period changes
|
||||||
chartPeriodHrs: function (newPeriod) {
|
chartPeriodHrs: function (newPeriod) {
|
||||||
if (newPeriod === "0") {
|
|
||||||
|
// eslint-disable-next-line eqeqeq
|
||||||
|
if (newPeriod == "0") {
|
||||||
this.heartbeatList = null;
|
this.heartbeatList = null;
|
||||||
this.$root.storage().removeItem(`chart-period-${this.monitorId}`);
|
this.$root.storage().removeItem(`chart-period-${this.monitorId}`);
|
||||||
} else {
|
} else {
|
||||||
|
@ -243,7 +245,8 @@ export default {
|
||||||
|
|
||||||
log.debug("ping_chart", `this.chartPeriodHrs type ${typeof this.chartPeriodHrs}, value: ${this.chartPeriodHrs}`);
|
log.debug("ping_chart", `this.chartPeriodHrs type ${typeof this.chartPeriodHrs}, value: ${this.chartPeriodHrs}`);
|
||||||
|
|
||||||
if (this.chartPeriodHrs !== "0") {
|
// eslint-disable-next-line eqeqeq
|
||||||
|
if (this.chartPeriodHrs != "0") {
|
||||||
const newBeat = heartbeatList.at(-1);
|
const newBeat = heartbeatList.at(-1);
|
||||||
if (newBeat && dayjs.utc(newBeat.time) > dayjs.utc(this.heartbeatList.at(-1)?.time)) {
|
if (newBeat && dayjs.utc(newBeat.time) > dayjs.utc(this.heartbeatList.at(-1)?.time)) {
|
||||||
this.heartbeatList.push(heartbeatList.at(-1));
|
this.heartbeatList.push(heartbeatList.at(-1));
|
||||||
|
|
Loading…
Reference in a new issue