Skip to content

Commit d27af3d

Browse files
authoredOct 26, 2022
fix: filter null node first. (#1909)
1 parent 91272ca commit d27af3d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

‎src/core/render/index.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,9 @@ export function Render(Base) {
260260
[
261261
document.querySelector('aside.sidebar'),
262262
document.querySelector('button.sidebar-toggle'),
263-
].forEach(node => node.parentNode.removeChild(node));
263+
]
264+
.filter(e => !!e)
265+
.forEach(node => node.parentNode.removeChild(node));
264266
document.querySelector('section.content').style.right = 'unset';
265267
document.querySelector('section.content').style.left = 'unset';
266268
document.querySelector('section.content').style.position = 'relative';

0 commit comments

Comments
 (0)