mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
fix: creating resource via dock is broken
Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
parent
0350fa53ff
commit
7f95a9568c
@ -59,11 +59,7 @@ export class CreateResourceInfoPanel extends React.Component<Props> {
|
||||
}
|
||||
|
||||
create = async (): Promise<any> => {
|
||||
const isEmpty = !this.draft?.trim();
|
||||
|
||||
if (!isEmpty) {
|
||||
return null;
|
||||
}
|
||||
if (!this.draft) return; // skip: empty draft
|
||||
|
||||
// skip empty documents if "---" pasted at the beginning or end
|
||||
const resources = jsYaml.safeLoadAll(this.draft).filter(Boolean);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user