Comparing string with number in BenchmarkGroup #1570
Labels
bug: lite
Debatable whether or not this is a bug. I mean, it’s not great but it’s not really broken either.
Milestone
Describe the bug
While adding DocStrings for type annotation, I encountered a possible bug in
eleventy/src/BenchmarkGroup.js
Line 109 in 82d83f5
Number.prototype.toFixed()
is resulting a String. You are comparing it with a number.This will likely cause JavaScript to apply a type conversion (cannot tell offset which gets converted how).
What are you trying to do here?
Expected behavior
Both parts of the comparison should have the same type.
Screenshots
Environment:
Additional context
Work in Progress Pull Request
The text was updated successfully, but these errors were encountered: