assets/js/dropdownExpander.mjs in hematite-0.1.2 vs assets/js/dropdownExpander.mjs in hematite-0.1.3
- old
+ new
@@ -49,10 +49,11 @@
function expandBasedOnURL() {
const doExpansion = (url) => {
// Determine the hash.
let hash = UrlHelper.getPageHash();
- if (hash == null) {
+ let isInvalid = hash && /^\#\d+/.exec(hash);
+ if (hash == null || isInvalid) {
return;
}
let targetElem = document.querySelector(hash);
let currentElem = targetElem;