Skip to content
This repository has been archived by the owner on Aug 11, 2021. It is now read-only.

using clone because JSON.parse(JSON.stringify(...)) errors when given undefined #124

Conversation

antialias
Copy link
Contributor

No description provided.

@antialias antialias changed the title using clone JSON.parse(JSON.stringify(...)) errors when given undefined using clone instead of JSON.parse(JSON.stringify(...)) errors when given undefined Nov 14, 2015
@antialias antialias force-pushed the bugfix-deep-clone-instead-of-stringify-parse branch 2 times, most recently from ccfc4ea to 3534cc3 Compare November 14, 2015 21:55
@antialias antialias changed the title using clone instead of JSON.parse(JSON.stringify(...)) errors when given undefined using clone because JSON.parse(JSON.stringify(...)) errors when given undefined Nov 14, 2015
@antialias antialias force-pushed the bugfix-deep-clone-instead-of-stringify-parse branch from 3534cc3 to 9796aeb Compare November 14, 2015 21:56
@antialias
Copy link
Contributor Author

bump

@antialias
Copy link
Contributor Author

Need anything else from me on this before it can be reviewed?

@antialias
Copy link
Contributor Author

bump

@antialias
Copy link
Contributor Author

antialias commented May 23, 2016

bump. What would you like me to do with this PR? Say the word and I'll stop bothering you guys about it.

@antialias
Copy link
Contributor Author

bump @othiym23 @iarna

@necccc
Copy link

necccc commented Feb 17, 2017

+1
This would just solve a weird issue for us right now, the root.maintainers field seems to undefined in some cases, and prevents publishing

@antialias antialias force-pushed the bugfix-deep-clone-instead-of-stringify-parse branch from fafd036 to d9b16d1 Compare June 28, 2017 21:56
@antialias
Copy link
Contributor Author

bump @othiym23 @iarna

1 similar comment
@antialias
Copy link
Contributor Author

bump @othiym23 @iarna

@zkat
Copy link
Contributor

zkat commented Mar 8, 2018

ugh this has been sitting around forever. We really shouldn't leave things hanging for this long like this.

Unfortunately, I would not take this patch: I don't think it's necessary to drag in a whole new dependency, when you can easily guard in this case with var maint = root.maintainers && JSON.parse(JSON.stringify(root.maintainers))

So I'm gonna close this, but I'll take a patch for a version using the guard? That seems fine enough to me.

@antialias
Copy link
Contributor Author

@zkat #171

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants