Fit.UI
Fit.UI copied to clipboard
Fit.Core.Clone(..) replaces undefined in arrays with null
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"]