Skip to content

Commit

Permalink
Checkout: Rename getter in States list to be more consistent with oth…
Browse files Browse the repository at this point in the history
…er getters
  • Loading branch information
stephanethomas committed Dec 3, 2015
1 parent 12dc339 commit ecda755
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion client/lib/states-list/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The following public methods are available:

This fetches the corresponding list of states from the server. The list is cached in the store upon retrieval.

### `getForCountry( countryCode )`
### `getByCountry( countryCode )`

This retrieves the list of states as a set of key and value pairs. The list is loaded from the store and then fetched once from the server to update any stale data.

Expand Down
2 changes: 1 addition & 1 deletion client/lib/states-list/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ StatesList.prototype.fetchForCountry = function( countryCode ) {
* @param {string} countryCode - country code
* @returns {object} the list of states
*/
StatesList.prototype.getForCountry = function( countryCode ) {
StatesList.prototype.getByCountry = function( countryCode ) {
var data;

if ( ! this.data ) {
Expand Down
2 changes: 1 addition & 1 deletion client/my-sites/upgrades/components/form/state-select.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ module.exports = React.createClass( {
focus: this.state.focus,
invalid: this.props.invalid
} ),
statesList = this.props.statesList.getForCountry( this.props.countryCode ),
statesList = this.props.statesList.getByCountry( this.props.countryCode ),
options = [];

if ( isEmpty( statesList ) ) {
Expand Down

0 comments on commit ecda755

Please sign in to comment.