fix: Fetches the party in the header on initial party page load

If the party page is refreshed, the header wasn't populating. This
fetches the party in the header _and_ the party page
This commit is contained in:
Blade Barringer
2016-05-23 07:13:53 -05:00
parent 63de1e398f
commit 0d2aa4e43a
+1 -1
View File
@@ -20,7 +20,7 @@ habitrpg.controller("PartyCtrl", ['$rootScope','$scope','Groups','Chat','User','
$rootScope.party = $scope.group = $scope.newGroup = { type: 'party' };
}
if ($state.is('options.social.party')) {
if ($state.is('options.social.party') && $rootScope.party) {
Groups.party(true).then(handlePartyResponse, handlePartyError);
} else {
Groups.Group.syncParty().then(handlePartyResponse, handlePartyError);