Fix slightly noisy warning when switching spaces (#9468)
Fix slightly noisy warning when switching spaces (#9468)

Sometimes `spaceName` can be `undefined` because of function timing - use a different method for getting the space's name when this happens.
matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk