snowtrack / snowfs

Operands must both be numbers or strings in addition expressions JS-0377
Anti-pattern
Minor
3 years ago3 years old
Operands of '+' operation must either be both strings or both numbers. Consider using a template literal
15  const hours = fill(Math.floor(offset / 60));
16  const minutes = fill(offset % 60);
17  const sign = (date.getTimezoneOffset() > 0) ? '-' : '+';
18  return `${sign + hours}${minutes}`;19}
20
21/**
Operands of '+' operation must either be both strings or both numbers. Consider using a template literal
15  const hours = fill(Math.floor(offset / 60));
16  const minutes = fill(offset % 60);
17  const sign = (date.getTimezoneOffset() > 0) ? '-' : '+';
18  return `${sign + hours}${minutes}`;19}
20
21/**