mirror of
https://github.com/nasa/openmct.git
synced 2025-04-10 12:50:15 +00:00
Adds missing id during create condition
This commit is contained in:
parent
de8d63c09d
commit
f91a64483b
@ -122,6 +122,7 @@ export default class ConditionManager extends EventEmitter {
|
||||
output: 'false',
|
||||
trigger: 'all',
|
||||
criteria: [{
|
||||
id: uuid(),
|
||||
telemetry: '',
|
||||
operation: '',
|
||||
input: [],
|
||||
@ -140,7 +141,7 @@ export default class ConditionManager extends EventEmitter {
|
||||
}
|
||||
|
||||
cloneCondition(conditionConfiguration, index) {
|
||||
this.createAndSaveCondition(index, JSON.parse(JSON.stringify(conditionConfiguration)));
|
||||
this.createAndSaveCondition(index, Object.assign({}, conditionConfiguration));
|
||||
}
|
||||
|
||||
createAndSaveCondition(index, conditionConfiguration) {
|
||||
|
@ -308,8 +308,7 @@ export default {
|
||||
this.persist();
|
||||
},
|
||||
cloneCriterion(index) {
|
||||
const clonedCriterion = JSON.parse(JSON.stringify(this.condition.configuration.criteria[index]));
|
||||
clonedCriterion.id = uuid();
|
||||
const clonedCriterion = Object.assign({}, this.condition.configuration.criteria[index], { id: uuid() });
|
||||
this.condition.configuration.criteria.splice(index + 1, 0, clonedCriterion);
|
||||
this.persist();
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user