mirror of
https://github.com/nasa/openmct.git
synced 2025-02-22 10:11:06 +00:00
moved opy to cloneCondition
This commit is contained in:
parent
a5a4bb87c5
commit
2907d6d79c
@ -108,7 +108,7 @@ export default class ConditionManager extends EventEmitter {
|
|||||||
...conditionConfiguration,
|
...conditionConfiguration,
|
||||||
id: uuid(),
|
id: uuid(),
|
||||||
configuration: {
|
configuration: {
|
||||||
...JSON.parse(JSON.stringify(conditionConfiguration)).configuration,
|
...conditionConfiguration.configuration,
|
||||||
name: `Copy of ${conditionConfiguration.configuration.name}`
|
name: `Copy of ${conditionConfiguration.configuration.name}`
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -138,7 +138,7 @@ export default class ConditionManager extends EventEmitter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
cloneCondition(conditionConfiguration, index) {
|
cloneCondition(conditionConfiguration, index) {
|
||||||
this.createAndSaveCondition(index, conditionConfiguration);
|
this.createAndSaveCondition(index, JSON.parse(JSON.stringify(conditionConfiguration)));
|
||||||
}
|
}
|
||||||
|
|
||||||
createAndSaveCondition(index, conditionConfiguration) {
|
createAndSaveCondition(index, conditionConfiguration) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user