Skip to content

Commit

Permalink
- FIX: Fixed issue where duplicating a trial AND changing the germpla…
Browse files Browse the repository at this point in the history
…sm information would cause the setup to fail.

- FIX: Fixed "undefined" rep values on trial duplication.
  • Loading branch information
sebastian-raubach committed Dec 5, 2024
1 parent 57b2408 commit 9d3724f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/TrialLayoutGermplasmGrid.vue
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ export default {
rep.className = 'grid-input'
rep.placeholder = 'Rep'
if (dataCell) {
rep.value = dataCell.rep
rep.value = dataCell.rep || ''
} else {
rep.value = ''
}
Expand Down
5 changes: 4 additions & 1 deletion src/views/TrialSetupView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,10 @@ export default {
this.traits.forEach(t => {
if (this.trialToCopy && this.copyData && sameDimensions) {
const toCopy = this.trialToCopy.data[k]
c.measurements[t.id] = JSON.parse(JSON.stringify(toCopy.measurements[t.id] || []))
if (toCopy) {
c.measurements[t.id] = JSON.parse(JSON.stringify(toCopy.measurements[t.id] || []))
}
} else {
c.measurements[t.id] = []
}
Expand Down

0 comments on commit 9d3724f

Please sign in to comment.