mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-17 02:56:57 +02:00
Fix console error when onPageNav !== 'separate' (#909)
This commit is contained in:
parent
92f95df934
commit
890054802d
1 changed files with 4 additions and 0 deletions
|
@ -127,6 +127,10 @@ class SideNav extends React.Component {
|
|||
var toggler = document.querySelector(togglerSelector);
|
||||
var target = document.querySelector(targetSelector);
|
||||
|
||||
if (!toggler) {
|
||||
return;
|
||||
}
|
||||
|
||||
toggler.onclick = function(event) {
|
||||
event.preventDefault();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue