chore: consistently use strict equality operator

This commit is contained in:
Safwan Samsudeen 2024-04-10 23:06:25 +05:30
parent 9401b35139
commit 889a03a828
2 changed files with 5 additions and 5 deletions

View File

@ -48,7 +48,7 @@ export default {
let vals = date_parts; let vals = date_parts;
if (time_parts && time_parts.length) { if (time_parts && time_parts.length) {
if (time_parts.length == 4) { if (time_parts.length === 4) {
time_parts[3] = "0." + time_parts[3]; time_parts[3] = "0." + time_parts[3];
time_parts[3] = parseFloat(time_parts[3]) * 1000; time_parts[3] = parseFloat(time_parts[3]) * 1000;
} }
@ -229,7 +229,7 @@ export default {
// Feb // Feb
const year = date.getFullYear(); const year = date.getFullYear();
if ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0) { if ((year % 4 === 0 && year % 100 != 0) || year % 400 === 0) {
return 29; return 29;
} }
return 28; return 28;

View File

@ -476,7 +476,7 @@ export default class Gantt {
highlightWeekends() { highlightWeekends() {
for (let d = new Date(this.gantt_start); d <= this.gantt_end; d.setDate(d.getDate() + 1)) { for (let d = new Date(this.gantt_start); d <= this.gantt_end; d.setDate(d.getDate() + 1)) {
if (d.getDay() == 0 || d.getDay() == 6) { if (d.getDay() === 0 || d.getDay() === 6) {
const x = (date_utils.diff(d, this.gantt_start, 'hour') / const x = (date_utils.diff(d, this.gantt_start, 'hour') /
this.options.step) * this.options.step) *
this.options.column_width; this.options.column_width;
@ -1023,13 +1023,13 @@ export default class Gantt {
get_task(id) { get_task(id) {
return this.tasks.find((task) => { return this.tasks.find((task) => {
return task.id == id; return task.id === id;
}); });
} }
get_bar(id) { get_bar(id) {
return this.bars.find((bar) => { return this.bars.find((bar) => {
return bar.task.id == id; return bar.task.id === id;
}); });
} }