mirror of https://github.com/rancher/dashboard.git
17 lines
348 B
JavaScript
17 lines
348 B
JavaScript
import cloneDeep from 'lodash/cloneDeep';
|
|
import merge from 'lodash/merge';
|
|
|
|
export default {
|
|
applyDefaults() {
|
|
return (idx, machinePools) => {
|
|
const _machinePools = cloneDeep(machinePools);
|
|
|
|
if (_machinePools[idx]) {
|
|
const copyConfig = _machinePools[idx]?.config;
|
|
|
|
merge(this, copyConfig);
|
|
}
|
|
};
|
|
},
|
|
};
|