Could abstract to `if location.hasNoHash() then document.location.hash else ''`