djedi-json
Advanced tools
Comparing version 0.5.6 to 0.5.7
/** clean the tree from faulty nodes */ | ||
export declare const cleanTree: (t: NodeTreeItem) => NodeTreeItem; | ||
export declare function lossyDeepClone<T>(o: T): any; |
@@ -1568,2 +1568,5 @@ import * as React from 'react'; | ||
}; | ||
function lossyDeepClone(o) { | ||
return JSON.parse(JSON.stringify(o)); | ||
} | ||
@@ -1615,3 +1618,5 @@ var reducer = function (state, action) { | ||
// keep tree in sync | ||
React__default.useEffect(function () { return setTree({ type: 'replace', payload: passedTree }); }, [passedTree]); | ||
React__default.useEffect( | ||
// deep cloning the tree here ensures there's no issues with mutating the passed in object further down the tree. | ||
function () { return setTree({ type: 'replace', payload: lossyDeepClone(passedTree) }); }, [passedTree]); | ||
// keep config in sync | ||
@@ -1618,0 +1623,0 @@ React__default.useEffect(function () { return setConfig(passedConfig); }, [passedConfig]); |
{ | ||
"name": "djedi-json", | ||
"version": "0.5.6", | ||
"version": "0.5.7", | ||
"main": "build/index.js", | ||
@@ -5,0 +5,0 @@ "module": "build/index.esm.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
388090
3927