Skip to content

Commit

Permalink
Checkout: Only set selected site once the sites have been fetched in …
Browse files Browse the repository at this point in the history
…`CartStore`
  • Loading branch information
drewblaisdell committed Feb 27, 2017
1 parent db3f7ac commit 7ceae43
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion client/lib/cart/store/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ CartStore.dispatchToken = Dispatcher.register( ( payload ) => {
} );

sites.on( 'change', setSelectedSite );
setSelectedSite();

if ( sites.fetched ) {
setSelectedSite();
}

module.exports = CartStore;

0 comments on commit 7ceae43

Please sign in to comment.