From 58c9d6cfab76286cb7d68a0e9e122ab7d4bb42ac Mon Sep 17 00:00:00 2001 From: Matchu Date: Thu, 6 Mar 2014 16:22:30 -0500 Subject: [PATCH] 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) --- app/assets/javascripts/outfits/edit.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/outfits/edit.js b/app/assets/javascripts/outfits/edit.js index f39f2c89..ae5d898a 100644 --- a/app/assets/javascripts/outfits/edit.js +++ b/app/assets/javascripts/outfits/edit.js @@ -375,7 +375,7 @@ View.Hash = function (wardrobe) { singleOutfitResponse('updatePetState', function (pet_state) { 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}); } });