Open Jemt opened 1 year ago
Arrays containing undefined will have this "value" replaced by null as the following example demonstrates:
Fit.Core.Clone({ List: ["a", undefined, "c"] }); outputs { List: ["a", null, "c"] }
Fit.Core.Clone({ List: ["a", undefined, "c"] });
{ List: ["a", null, "c"] }
The problem is related to the Clone function's internal use of JSON.stringify(..) which behaves exactly like that: JSON.stringify(["a", undefined, "b"]) outputs ["a", null, "c"]
JSON.stringify(["a", undefined, "b"])
["a", null, "c"]
Arrays containing undefined will have this "value" replaced by null as the following example demonstrates:
Fit.Core.Clone({ List: ["a", undefined, "c"] });
outputs{ List: ["a", null, "c"] }
The problem is related to the Clone function's internal use of JSON.stringify(..) which behaves exactly like that:
JSON.stringify(["a", undefined, "b"])
outputs["a", null, "c"]