Pamels: Options are always there

This commit is contained in:
Torkel Ödegaard
2019-03-24 18:34:43 +01:00
parent e03c7bf1a3
commit f4f5eeeb18

View File

@@ -9,15 +9,13 @@ const optionsToKeep = ['valueOptions', 'stat', 'maxValue', 'maxValue', 'threshol
export const singleStatBaseOptionsCheck = (
options: Partial<SingleStatBaseOptions>,
prevPluginId: string,
prevOptions?: any
prevOptions: any
) => {
if (prevOptions) {
optionsToKeep.forEach(v => {
if (prevOptions.hasOwnProperty(v)) {
options[v] = cloneDeep(prevOptions.display);
}
});
}
optionsToKeep.forEach(v => {
if (prevOptions.hasOwnProperty(v)) {
options[v] = cloneDeep(prevOptions.display);
}
});
return options;
};