fix: deepObjectCopy returns Date object instead of empty object

This commit is contained in:
Jarrod Flesch
2021-10-07 10:58:33 -04:00
parent 5056e18734
commit 27117292f3

View File

@@ -1,4 +1,6 @@
const deepCopyObject = (inObject) => {
if (inObject instanceof Date) return inObject;
if (typeof inObject !== 'object' || inObject === null) {
return inObject; // Return the value if inObject is not an object
}