1
0
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:
Roman 2021-10-12 13:02:37 +03:00
parent 0350fa53ff
commit 7f95a9568c

View File

@ -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);