Fixes #864
Merge pull request #891 from hpinkos/cloneUndefined

Fixes #864