Bug Report
Steps to reproduce
- Setup fresh site
- Add config:
window.$docsify = {
name: '',
repo: '',
// cover page doc
coverpage: true,
homepage: 'home.md',
// remove sidebar
hideSidebar: true,
// auto scroll to top
auto2top: true
}
- Create two or more
md pages:
home.md -- add 2x href to page1 and page2
page1.md -- add 2x href to home and page2
page2.md -- add 2x href to home and page1
- Launch http://localhost:3000
- From
/#/home in console no errors
- Click on
page1 link
- Continue to cycle through pages without hard refresh
What is current behaviour
After first load and the sidebar is removed, any other navigation to other pages triggers the .remove which fails since the element is already gone.
If the error is hit, then following plugins dont run until a hard reload.
Uncaught TypeError: Cannot read property 'remove' of null
at Vn.Xn._renderSidebar (docsify.min.js:1)
at Vn.Pn (docsify.min.js:1)
at docsify.min.js:1
at o (docsify.min.js:1)
at B (docsify.min.js:1)
at t (docsify.min.js:1)
at docsify.min.js:1
at docsify.min.js:1
at docsify.min.js:1
at On (docsify.min.js:1)
Line 4150: return document.querySelector("aside.sidebar").remove(),
What is the expected behaviour
Error doesn't occur, and doesn't stop other scripts from running.
Other relevant information
Bug Report
Steps to reproduce
mdpages:home.md-- add 2xhreftopage1andpage2page1.md-- add 2xhreftohomeandpage2page2.md-- add 2xhreftohomeandpage1/#/homein console no errorspage1linkWhat is current behaviour
After first load and the sidebar is removed, any other navigation to other pages triggers the
.removewhich fails since the element is already gone.If the error is hit, then following plugins dont run until a hard reload.
What is the expected behaviour
Error doesn't occur, and doesn't stop other scripts from running.
Other relevant information
Bug does still occur when all/other plugins are disabled?
Your OS: macOS
Node.js version: 14.8.0
npm/yarn version: 6.14.8
Browser version:
Docsify version: 4.11.6
Docsify plugins: