This is an automated email from the ASF dual-hosted git repository.

marat pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-karavan.git


The following commit(s) were added to refs/heads/main by this push:
     new cf63370e Fix #1163
cf63370e is described below

commit cf63370ed954b9cf6cc3d1c7bdb0dac40020c467
Author: Marat Gubaidullin <ma...@talismancloud.io>
AuthorDate: Wed Mar 20 16:21:57 2024 -0400

    Fix #1163
---
 karavan-space/src/space/SpacePage.tsx | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/karavan-space/src/space/SpacePage.tsx 
b/karavan-space/src/space/SpacePage.tsx
index 548e5025..69c5deb3 100644
--- a/karavan-space/src/space/SpacePage.tsx
+++ b/karavan-space/src/space/SpacePage.tsx
@@ -85,8 +85,9 @@ export class SpacePage extends React.Component<Props, State> {
     }
 
     addYaml = (yaml: string | undefined) => {
+        let existing = this.props.yaml?.toString()?.trim() === '[]' ? '' : 
this.props.yaml;
         if (yaml) {
-            this.save(this.props.name, this.props.yaml + "\n" + yaml, false);
+            this.save(this.props.name, yaml + "\n" + existing, false);
         }
         this.setState({showUploadModal: false, key: Math.random().toString()})
     }

Reply via email to