Skip to content

Commit

Permalink
remove arrow function from benchmarks that cause bench runner to fail…
Browse files Browse the repository at this point in the history
… in safari
  • Loading branch information
Molly Lloyd committed Aug 15, 2016
1 parent 50142de commit 1a7e6a7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bench/lib/set_data_perf.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ module.exports = function(source, numCalls, geojson, cb) {
startTime = performance.now();
source.setData(geojson);
} else {
var avgTileTime = times.reduce((v, t) => v + t, 0) / times.length;
var avgTileTime = times.reduce(function (v, t) {
return v + t;
}, 0) / times.length;

This comment has been minimized.

Copy link
@anandthakker

anandthakker Aug 16, 2016

Contributor

@mollymerp since babel is already here to handle React, a relatively lightweight way to allow arrow functions here would be to include https://github.com/yoshuawuyts/babel-preset-es2020 . Then again, I guess they still wouldn't be fair game in the rest of the codebase, so maybe it's better not to. ¯_(ツ)_/¯

This comment has been minimized.

Copy link
@lucaswoj

lucaswoj Aug 16, 2016

Contributor

This is a matter of opinion. We have decided to avoid transpiling as much as possible.

source.off('tile.load', tileCounter);
cb(null, avgTileTime);
}
Expand Down

0 comments on commit 1a7e6a7

Please sign in to comment.