fix: creating resource via dock is broken

Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
Roman committed 2021-10-12 13:02:37 +03:00
1 parent 0350fa53ff
commit 7f95a9568c
1 file changed
+1 -5
@@ -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);