only add window.location.search if there is no fragment passed in to allow navigating to new URLs without including params