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:
parent
b61ba7ef71
commit
e97b30dae0
@ -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+/);
|
||||
|
||||
if (byWhitespace.length > 1) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user