mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fixing return statements in Pod menus (#1211)
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
1 parent
484de2ec21
commit
e3354f3b75
3 files changed
+2
-3
No files matched your search
@@ -22,7 +22,7 @@ export class PodLogsMenu extends React.Component<PodLogsMenuProps> {
|
||||
const { object: pod, toolbar } = this.props
|
||||
const containers = pod.getAllContainers();
|
||||
const statuses = pod.getContainerStatuses();
|
||||
if (!containers.length) return;
|
||||
if (!containers.length) return null;
|
||||
return (
|
||||
<Component.MenuItem onClick={Util.prevDefault(() => this.showLogs(containers[0]))}>
|
||||
<Component.Icon material="subject" title="Logs" interactive={toolbar}/>
|
||||
|
||||
@@ -34,7 +34,7 @@ export class PodShellMenu extends React.Component<PodShellMenuProps> {
|
||||
render() {
|
||||
const { object, toolbar } = this.props
|
||||
const containers = object.getRunningContainers();
|
||||
if (!containers.length) return;
|
||||
if (!containers.length) return null;
|
||||
return (
|
||||
<Component.MenuItem onClick={Util.prevDefault(() => this.execShell(containers[0].name))}>
|
||||
<Component.Icon svg="ssh" interactive={toolbar} title="Pod shell"/>
|
||||
|
||||
Reference in new issue
Block a user