Skip to content

Commit

Permalink
fix: filter null node first. (#1909)
Browse files Browse the repository at this point in the history
  • Loading branch information
Koooooo-7 committed Oct 26, 2022
1 parent f0d3cb2 commit 417d066
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 417d066

Please sign in to comment.