Skip to content

Commit cc456bc

Browse files
authored
Merge pull request #200 from erdnaxe/fix-hash-js
html/template.html: fix location hash redirect
2 parents ac73235 + 99eed22 commit cc456bc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/html/template.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,9 @@ <h4>
251251
if(field && document.getElementById(`${peripheral}-${register}-fields`)) {
252252
document.getElementById(`${peripheral}-${register}-fields`).open = true
253253
}
254-
window.location.hash = window.location.hash
254+
if (window.location.hash) {
255+
window.location.hash = window.location.hash
256+
}
255257
}
256258
window.addEventListener("hashchange", locationHashChanged)
257259
locationHashChanged()

0 commit comments

Comments
 (0)