Pamels: Options are always there

pull/16166/head
Torkel Ödegaard 7 years ago
parent e03c7bf1a3
commit f4f5eeeb18
  1. 4
      public/app/plugins/panel/singlestat2/module.tsx

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

Loading…
Cancel
Save