Skip to content

Commit

Permalink
failed to create new case: sourceDatasets - this.aCase.datasets is un…
Browse files Browse the repository at this point in the history
…defined

Fixes #124
  • Loading branch information
machristie committed Apr 20, 2021
1 parent 6ba20bc commit 2bf2eef
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions frontend/src/components/CaseEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -284,11 +284,13 @@ export default {
if (this.datasets) {
const sources = this.datasets.filter((ds) => ds.type === "source");
// Add deleted sources that are used by the case to the list
this.aCase.datasets
.filter((ds) => ds.type === "source" && ds.deleted)
.forEach((ds) => {
sources.push(ds);
});
if (this.aCase.datasets) {
this.aCase.datasets
.filter((ds) => ds.type === "source" && ds.deleted)
.forEach((ds) => {
sources.push(ds);
});
}
return sources;
} else {
return [];
Expand All @@ -297,12 +299,14 @@ export default {
sinkDatasets() {
if (this.datasets) {
const sinks = this.datasets.filter((ds) => ds.type === "sink");
// Add deleted sources that are used by the case to the list
this.aCase.datasets
.filter((ds) => ds.type === "sink" && ds.deleted)
.forEach((ds) => {
sinks.push(ds);
});
// Add deleted sinks that are used by the case to the list
if (this.aCase.datasets) {
this.aCase.datasets
.filter((ds) => ds.type === "sink" && ds.deleted)
.forEach((ds) => {
sinks.push(ds);
});
}
return sinks;
} else {
return [];
Expand Down

0 comments on commit 2bf2eef

Please sign in to comment.