Skip to content

Commit

Permalink
use for of instead of for in
Browse files Browse the repository at this point in the history
  • Loading branch information
pavel06081991 committed Sep 24, 2018
1 parent 85dd232 commit 2b23275
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions x-pack/plugins/searchprofiler/public/filters/ns_to_pretty.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ export function nsToPretty(ns, precision) {
precision = 1;
}
const units = ['ns', 'µs'];
// eslint-disable-next-line guard-for-in
for (const i in units) {

for (const unit of units) {
if (ns < 1000) {
return ns.toFixed(precision) + units[i];
return ns.toFixed(precision) + unit;
}
ns /= 1000;
}
Expand Down

0 comments on commit 2b23275

Please sign in to comment.