diff --git a/js/components/whitelabel/prize/simple_prize/stores/prize_rating_store.js b/js/components/whitelabel/prize/simple_prize/stores/prize_rating_store.js index 6c478f3c..d3544f71 100644 --- a/js/components/whitelabel/prize/simple_prize/stores/prize_rating_store.js +++ b/js/components/whitelabel/prize/simple_prize/stores/prize_rating_store.js @@ -14,6 +14,18 @@ class PrizeRatingStore { }); } + getInitialState() { + this.ratings = []; + this.currentRating = null; + this.average = null; + + return { + ratings: this.ratings, + currentRating: this.currentRating, + average: this.average + }; + } + onUpdatePrizeRatings(ratings) { this.ratings = ratings; } @@ -30,18 +42,6 @@ class PrizeRatingStore { onResetPrizeRatings() { this.getInitialState(); } - - getInitialState() { - this.ratings = []; - this.currentRating = null; - this.average = null; - - return { - ratings: this.ratings, - currentRating: this.currentRating, - average: this.average - }; - } } -export default alt.createStore(PrizeRatingStore, 'PrizeRatingStore'); \ No newline at end of file +export default alt.createStore(PrizeRatingStore, 'PrizeRatingStore');