Added additional conditional to prevent menu expansion on a blank url