1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

satisfy lint and some autoformatting

Signed-off-by: Jim Ehrismann <jehrismann@mirantis.com>
This commit is contained in:
Jim Ehrismann 2021-10-22 10:45:58 -04:00
parent 3c6d59645b
commit 06fac38318
3 changed files with 10 additions and 5 deletions

View File

@ -37,9 +37,10 @@ export class PortForwardMenu extends React.Component<Props> {
@boundMethod
remove() {
const { portForward } = this.props;
try {
removePortForward(portForward);
} catch(eror) {
} catch (error) {
Notifications.error(`Error occurred stopping the port-forward from port ${portForward.forwardPort}. The port-forward may still be active.`);
}
}

View File

@ -51,7 +51,7 @@ export class ServicePortComponent extends React.Component<Props> {
componentDidMount() {
disposeOnUnmount(this, [
reaction(() => [ portForwardStore.portForwards, this.props.service ], () => this.checkExistingPortForwarding()),
reaction(() => [portForwardStore.portForwards, this.props.service], () => this.checkExistingPortForwarding()),
]);
}
@ -66,10 +66,12 @@ export class ServicePortComponent extends React.Component<Props> {
};
let activePort: number;
try {
activePort = await getPortForward(portForward) ?? 0;
} catch(error) {
} catch (error) {
this.isPortForwarded = false;
return;
}

View File

@ -55,7 +55,7 @@ export class PodContainerPort extends React.Component<Props> {
componentDidMount() {
disposeOnUnmount(this, [
reaction(() => [ portForwardStore.portForwards, this.props.pod ], () => this.checkExistingPortForwarding()),
reaction(() => [portForwardStore.portForwards, this.props.pod], () => this.checkExistingPortForwarding()),
]);
}
@ -70,10 +70,12 @@ export class PodContainerPort extends React.Component<Props> {
};
let activePort: number;
try {
activePort = await getPortForward(portForward) ?? 0;
} catch(error) {
} catch (error) {
this.isPortForwarded = false;
return;
}