Fix: Small fix for location hash/fragment (#2464)
This commit is contained in:
parent
f3d19ca744
commit
73b8c7872e
|
@ -39,7 +39,10 @@ pub fn location_hash() -> Option<String> {
|
|||
if is_server() {
|
||||
None
|
||||
} else {
|
||||
location().hash().ok().map(|hash| hash.replace('#', ""))
|
||||
location().hash().ok().map(|hash| match hash.chars().next() {
|
||||
Some('#') => hash[1..].to_string(),
|
||||
_ => hash,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue