Closed ppwwyyxx closed 1 year ago
The following code:
https://github.com/ppoffice/hexo-component-inferno/blob/944db588e4e90f4d93469d1b83546e27e9b67af0/src/hexo/tag/tabs.js#L240-L246
treats any location.hash as part of an menu. However, in practice, location.hash may point to other elements in the page.
location.hash
This causes my page to error at the line:
Array.from($tabMenuContainer.children).forEach($menu => $menu.classList.remove('is-active'));
because the classList attribute is not available.
classList
I think there should be a check that location.hash really points to something in a tab menu.
(also, maybe should not use querySelector similar to https://github.com/ppoffice/hexo-theme-icarus/pull/1116 )
The following code:
https://github.com/ppoffice/hexo-component-inferno/blob/944db588e4e90f4d93469d1b83546e27e9b67af0/src/hexo/tag/tabs.js#L240-L246
treats any
location.hash
as part of an menu. However, in practice,location.hash
may point to other elements in the page.This causes my page to error at the line:
because the
classList
attribute is not available.I think there should be a check that
location.hash
really points to something in a tab menu.