Skip to content
This repository was archived by the owner on Jul 30, 2025. It is now read-only.

Commit dee5598

Browse files
committed
fix(plugins/plugin-client-common): if client does not define notebooks, Sidebar crashes on Escape
1 parent f93f302 commit dee5598

File tree

1 file changed

+7
-5
lines changed
  • plugins/plugin-client-common/src/components/Client

1 file changed

+7
-5
lines changed

plugins/plugin-client-common/src/components/Client/Sidebar.tsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,13 @@ export default class Sidebar extends React.PureComponent<Props, State> {
131131

132132
public render() {
133133
return (
134-
<PageSidebar
135-
nav={this.props.isOpen && this.nav()}
136-
isNavOpen={this.props.isOpen}
137-
className="kui--tab-container-sidebar"
138-
/>
134+
Array.isArray(this.props.guidebooks) && (
135+
<PageSidebar
136+
nav={this.props.isOpen && this.nav()}
137+
isNavOpen={this.props.isOpen}
138+
className="kui--tab-container-sidebar"
139+
/>
140+
)
139141
)
140142
}
141143
}

0 commit comments

Comments
 (0)