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 authored and GitHub committed 2021-08-23 15:27:54 +03:00
1 parent d3ce43e73d
commit 7b48ab0279
3 files changed
+5 -3

No files matched your search

+3 -1
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}/>