-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove arrow function from benchmarks that cause bench runner to fail…
… 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.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
lucaswoj
Contributor
|
||
source.off('tile.load', tileCounter); | ||
cb(null, avgTileTime); | ||
} | ||
|
@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. ¯_(ツ)_/¯