Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Set readable names for date objects. #554

Merged
merged 2 commits into from
Apr 20, 2017

Conversation

zinoviev
Copy link
Contributor

PR for #388

@gaearon
Copy link
Contributor

gaearon commented Feb 19, 2017

If you look at #388, you will see that there is a discussion with another person working on it, and a label saying "someone is working on this". I appreciate the pull request, but I will close this without reviewing because we need to give the person who already started the work a chance to finish it. If he gets stuck, and we can't work it out, or loses interest, I'll remove the "someone is working on this" label, and the task will be up for grabs again. Thanks!

@gaearon gaearon closed this Feb 19, 2017
@gaearon gaearon reopened this Apr 20, 2017
@gaearon
Copy link
Contributor

gaearon commented Apr 20, 2017

Reopening since #559 received no followup.
Could you please rebase this?

@@ -77,8 +77,10 @@ function dehydrate(data: Object, cleaned: Array<Array<string>>, path?: Array<str
// TODO when this is in the iframe window, we can just use Object
if (data.constructor && typeof data.constructor === 'function' && data.constructor.name !== 'Object') {
cleaned.push(path);
const isDate = data.constructor.name === 'Date';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this check guaranteed to work? Maybe we can do something safer, like Object.prototype.toString.call(data)?

@zinoviev
Copy link
Contributor Author

@gaearon rebased and updated

For consistency with how Chrome displays it (it's an object after all)
@gaearon gaearon merged commit 90b8b25 into facebook:master Apr 20, 2017
@gaearon
Copy link
Contributor

gaearon commented Apr 20, 2017

Thanks!

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

Successfully merging this pull request may close these issues.

3 participants