mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Check if name is undefined
Signed-off-by: Hung-Han (Henry) Chen <chenhungh@gmail.com>
This commit is contained in:
1 file changed
+4
-1
@@ -67,7 +67,10 @@ function onMenuItemClick(menuItem: CatalogEntityContextMenu) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getNameParts(name: string): string[] {
|
function getNameParts(name?: string) {
|
||||||
|
if (!name) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
const byWhitespace = name.split(/\s+/);
|
const byWhitespace = name.split(/\s+/);
|
||||||
|
|
||||||
if (byWhitespace.length > 1) {
|
if (byWhitespace.length > 1) {
|
||||||
|
|||||||
Reference in new issue
Block a user