mirror of
https://github.com/nasa/openmct.git
synced 2024-12-30 01:48:51 +00:00
Reassign ids for criteria when we clone conditions
This commit is contained in:
parent
063a6c0e51
commit
f96dfcc942
@ -141,7 +141,9 @@ export default class ConditionManager extends EventEmitter {
|
||||
}
|
||||
|
||||
cloneCondition(conditionConfiguration, index) {
|
||||
this.createAndSaveCondition(index, JSON.parse(JSON.stringify(conditionConfiguration)));
|
||||
let clonedConfig = JSON.parse(JSON.stringify(conditionConfiguration));
|
||||
clonedConfig.configuration.criteria.forEach((criterion) => criterion.id = uuid());
|
||||
this.createAndSaveCondition(index, clonedConfig);
|
||||
}
|
||||
|
||||
createAndSaveCondition(index, conditionConfiguration) {
|
||||
|
Loading…
Reference in New Issue
Block a user