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 authored Oct 26, 2022
1 parent 91272ca commit d27af3d
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

1 comment on commit d27af3d

@vercel
Copy link

@vercel vercel bot commented on d27af3d Oct 26, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.