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

Do not copy if title isn't of type 'string' (#3657)

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev 2021-08-23 15:27:54 +03:00 committed by GitHub
parent d3ce43e73d
commit 7b48ab0279
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 3 deletions

View File

@ -173,7 +173,7 @@ export class HelmChartDetails extends Component<Props> {
render() {
const { chart, hideDetails } = this.props;
const title = chart ? <>Chart: {chart.getFullName()}</> : "";
const title = chart ? `Chart: ${chart.getFullName()}` : "";
return (
<Drawer

View File

@ -288,7 +288,7 @@ export class ReleaseDetails extends Component<Props> {
render() {
const { release, hideDetails } = this.props;
const title = release ? <>Release: {release.getName()}</> : "";
const title = release ? `Release: ${release.getName()}` : "";
const toolbar = <HelmReleaseMenu release={release} toolbar hideDetails={hideDetails}/>;
return (

View File

@ -163,7 +163,9 @@ export class Drawer extends React.Component<DrawerProps> {
<div className="drawer-title flex align-center">
<div className="drawer-title-text flex gaps align-center">
{title}
<Icon material={copyIcon} tooltip={copyTooltip} onClick={this.copyK8sObjName}/>
{typeof title == "string" && (
<Icon material={copyIcon} tooltip={copyTooltip} onClick={this.copyK8sObjName}/>
)}
</div>
{toolbar}
<Icon material="close" onClick={this.close}/>