1
0
mirror of https://github.com/beestat/app.git synced 2026-03-24 02:18:05 -04:00
beestat/js/beestat/clone.js
Jon Ziebell 98905d6181 Fixed #124 - Temperature Profiles chart axis gets skewed if you reload a previously loaded profile (only in °C)
I was performing the same mutation on an object multiple times because I did not clone it or store the data separately.
2019-06-04 22:23:45 -04:00

11 lines
228 B
JavaScript

/**
* Performs a deep clone of a simple object.
*
* @param {Object} object The object to clone.
*
* @return {Object} The cloned object.
*/
beestat.clone = function(object) {
return JSON.parse(JSON.stringify(object));
};