Navigation Menu

Skip to content

Commit

Permalink
Extract helper function from keys.settle function so that it is only …
Browse files Browse the repository at this point in the history
…created once.
  • Loading branch information
anthonyvia committed Aug 6, 2015
1 parent 9aa48c3 commit 2f6cfc6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions keys.js
Expand Up @@ -101,14 +101,14 @@ define(function(require) {
});

return p;
}

function populateResults(key, states, results, resolver) {
for(var i=0; i<keys.length; i++) {
results[keys[i]] = states[i];
}
resolver.resolve(results);
function populateResults(keys, states, results, resolver) {
for(var i=0; i<keys.length; i++) {
results[keys[i]] = states[i];
}
}
resolver.resolve(results);
}

});
})(typeof define === 'function' && define.amd ? define : function (factory) { module.exports = factory(require); });

0 comments on commit 2f6cfc6

Please sign in to comment.