always include state in wardrobe url, even if it's the default

Mostly this was because of Mac's bug where you, in Firefox:
1. Load a real pet with the default appearance (probs Happy Male) into the wardrobe
2. Use a search query containing ":"
3. See the pet biology vanish before your eyes!

I observed that this only happened in cases where the biology stuff in the URL
wasn't replaced by a state number, so figured that it'd probably be good to do
that anyway because biology fields are annoying, and it for some reason seemed
to fix the bug. (Something to do with query parsing and stupid internal state
issues, probably. Ugh. One of these days, I'll re-rewrite all this :P)
This commit is contained in:
Emi Matchu 2014-03-06 16:22:30 -05:00
parent b0fc2df8b6
commit 58c9d6cfab

View file

@ -375,7 +375,7 @@ View.Hash = function (wardrobe) {
singleOutfitResponse('updatePetState', function (pet_state) { singleOutfitResponse('updatePetState', function (pet_state) {
var pet_type = wardrobe.outfits.getPetType(); var pet_type = wardrobe.outfits.getPetType();
if(pet_state.id != data.state && pet_type && (data.state || pet_state.id != pet_type.pet_states[0].id)) { if(pet_state.id != data.state && pet_type) {
changeQuery({biology: undefined, state: pet_state.id}); changeQuery({biology: undefined, state: pet_state.id});
} }
}); });