I'd say 'depends' as well.
I'm currently playing a P-bass, and it's a ripper; I've heard it through a really good amp at my teacher's place. At the moment, I'd upgrade my own crappy amp because I know my bass sounds good.
But in the future, I really want a Stingray cos it can fill the niches my P-bass can't, so that'll be when I upgrade my bass (get another one, whatever).
Sooooo, basically, if I'm happy with my bass, I'll upgrade the amp. If I'm not happy with the bass, then I'll upgrade that first. I mean like if it feels like crap, it's not balanced, the fingerboard and neck aren't nice, of course I'll upgrade the bass, because I' pretty happy sometimes practising acoustically, without the amp.