H5P.cloneObject will not turn null values into empty objects OR Clearly mark H5P.cloneObject as deprecated for future use OR Remove H5P.cloneObject from core and replace calls to it throughout existing H5P code
Since there's a 4 year old comment wondering if this function should be in core at all with a hint to jQuery.extend, the function might also be marked as deprecated or removed. Note: jQuery itself might be removed (), so a custom extend/clone function might be handy.
acceptance criteria
H5P.cloneObject will not turn null values into empty objects
OR
Clearly mark H5P.cloneObject as deprecated for future use
OR
Remove H5P.cloneObject from core and replace calls to it throughout existing H5P code
background
H5P.cloneObject will not make exact copies of the object if a key's value is null because of https://github.com/h5p/h5p-php-library/blob/master/js/h5p.js#L1682
Possible fix:
Since there's a 4 year old comment wondering if this function should be in core at all with a hint to jQuery.extend, the function might also be marked as deprecated or removed. Note: jQuery itself might be removed (), so a custom extend/clone function might be handy.