Fit.UI icon indicating copy to clipboard operation
Fit.UI copied to clipboard

Fit.Core.Clone(..) replaces undefined in arrays with null

Open Jemt opened this issue 2 years ago • 0 comments

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"]

Jemt avatar Mar 28 '23 17:03 Jemt