Skip to content

Commit

Permalink
dreamfactorysoftware#294 - Fix script save issue
Browse files Browse the repository at this point in the history
  • Loading branch information
root authored and root committed Aug 5, 2024
1 parent 5a288d1 commit ca8e81f
Showing 1 changed file with 4 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,16 @@ export class DfServiceDetailsComponent implements OnInit {
};
// data.service_doc_by_service_id = null;
// data.config.content = this.serviceDefinition;
if (!data.config.serviceDefinition) {
console.log(data.config);
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 ca8e81f

Please sign in to comment.