diff --git a/src/core/render/index.js b/src/core/render/index.js index f9e78f919..7ff29a9f2 100644 --- a/src/core/render/index.js +++ b/src/core/render/index.js @@ -255,8 +255,8 @@ export function Render(Base) { const sidebarToggleEl = dom.getNode('button.sidebar-toggle'); if (hideSidebar) { - sidebarEl?.parentNode?.removeChild(sidebarEl); - sidebarToggleEl?.parentNode?.removeChild(sidebarToggleEl); + sidebarEl?.parentNode.removeChild(sidebarEl); + sidebarToggleEl?.parentNode.removeChild(sidebarToggleEl); return null; }