Skip to content

Commit

Permalink
Merge pull request #295 from Yi-Jacob/task/294-script-save-issue
Browse files Browse the repository at this point in the history
#294 - Fix script save issue
  • Loading branch information
thekevinm authored Aug 5, 2024
2 parents 298b94c + c2645d5 commit 7db088a
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ export class DfServiceDetailsComponent implements OnInit {
data.config.serviceDefinition = data?.serviceDocByServiceId.content;
}
this.serviceData = data;
if (data.serviceDocByServiceId) {
if (data) {
this.content = data.serviceDocByServiceId.content;
} else {
this.content = '';
Expand Down Expand Up @@ -407,15 +407,15 @@ export class DfServiceDetailsComponent implements OnInit {
};
// data.service_doc_by_service_id = null;
// data.config.content = this.serviceDefinition;
if (!data.config.serviceDefinition) {
if (!data.config) {
data.service_doc_by_service_id = null;
} else {
data.service_doc_by_service_id.content = data.config.serviceDefinition;
data.service_doc_by_service_id.format = Number(
this.serviceDefinitionType
);
delete data.config.serviceDefinition;
}
delete data.config.serviceDefinition;
} else {
delete data.service_doc_by_service_id;
}
Expand Down

0 comments on commit 7db088a

Please sign in to comment.