add structuredClone in pie getConfig

This commit is contained in:
Reda Al Sulais 2023-08-12 21:09:14 +03:00
parent f01ad644e3
commit cb5f70c139

View File

@ -37,7 +37,7 @@ const setConfig = (conf: PieDiagramConfig): void => {
config = cleanAndMerge(DEFAULT_PIE_CONFIG, conf);
};
const getConfig = (): Required<PieDiagramConfig> => config;
const getConfig = (): Required<PieDiagramConfig> => structuredClone(config);
const resetConfig = (): void => {
config = structuredClone(DEFAULT_PIE_CONFIG);