You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please excuse my ignorance. for in has to stay in order to iterate over object's prototype properties. So the question remaining is can we ADD iteration over Object.getOwnPropertyNames(o); ?
Hi guys,
I have a problem with copying objects that contain Error objects. serializing Error causes to completely loosing its properties.
When you look at cloneProto function I think you could change the for clause to fetch property names
const props = Object.getOwnPropertyNames(o);
for (const k of props) {
We loose
name
but at least we havemessage
andstack
. What do you think?The text was updated successfully, but these errors were encountered: