Skip to content

Commit

Permalink
fix: filter null node first.
Browse files Browse the repository at this point in the history
  • Loading branch information
Koooooo-7 committed Oct 25, 2022
1 parent 91272ca commit d4d3b06
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/core/render/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,9 @@ export function Render(Base) {
[
document.querySelector('aside.sidebar'),
document.querySelector('button.sidebar-toggle'),
].forEach(node => node.parentNode.removeChild(node));
]
.filter(e => !!e)
.forEach(node => node.parentNode.removeChild(node));
document.querySelector('section.content').style.right = 'unset';
document.querySelector('section.content').style.left = 'unset';
document.querySelector('section.content').style.position = 'relative';
Expand Down

0 comments on commit d4d3b06

Please sign in to comment.