Skip to content

Commit

Permalink
chore: updated param name to match docs and make more sense
Browse files Browse the repository at this point in the history
  • Loading branch information
benswinburne committed Apr 9, 2019
1 parent 44bf37d commit 683d197
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ function closest(averages) {
);
}

function findClosestAWSRegion(from, options) {
function findClosestAWSRegion(to, options) {
options = options || {};
options.data = options.data || data;
options.filters = options.filters || [];
options.default = options.default || options.filters[0] || 'us-east-1';

const current = options.data.find(a => a.region === from);
const current = options.data.find(a => a.region === to);

if (!current) {
return options.default;
Expand Down

0 comments on commit 683d197

Please sign in to comment.