Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolves Issue with DeSerialization of Date: #4696 #4706

Merged
merged 5 commits into from
Dec 3, 2017

Conversation

ronak1009
Copy link
Contributor

Fixes #4696: Issue with DeSerialization of Date

Copy link
Contributor

@TimvdLippe TimvdLippe left a comment

Choose a reason for hiding this comment

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

Could you fix the indentation and remove the package-lock.json from this PR? Then it is ready for merge

Copy link
Contributor

@TimvdLippe TimvdLippe left a comment

Choose a reason for hiding this comment

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

LGTM. @sorvell could you sign off as well?

@sorvell
Copy link
Contributor

sorvell commented Sep 22, 2017

Sorry for the delay. Would you mind adding a test?

@ronak1009
Copy link
Contributor Author

@sorvell I have added the test case and updated the pull request

Copy link
Contributor

@TimvdLippe TimvdLippe left a comment

Choose a reason for hiding this comment

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

It seems that you also need to rebase this PR on master to avoid conflicts.

let ser = [];
ser[0] = window.XFoo.prototype._deserializeValue(dateArr[1], Date);
ser[1] = window.XFoo.prototype._deserializeValue(dateArr[2], Date);
ser[2] = window.XFoo.prototype._deserializeValue(dateArr[3], Date);
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems like there is no assertion for this line? Could you add one for it? Also the variable name ser seems cryptic to me. Would be better to use a longer name to improve readability

Copy link
Contributor Author

@ronak1009 ronak1009 Nov 16, 2017

Choose a reason for hiding this comment

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

here I am just storing the return values of the deserializeValue function. I have used them in assert statements below.
I took this approach so that assert statements becomes more readable.
I shall change the variable name ser to serializedValue which shall become more readable.

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't disagree with the separation of the serializedValue array and the assertions, but I meant that I don't see any reference to ser[2] in the assertions on the lines below.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ping @ronak1009 could you rebase and update the variable names per this comment 😄

@TimvdLippe TimvdLippe merged commit 939ce63 into Polymer:master Dec 3, 2017
@TimvdLippe
Copy link
Contributor

I manually updated the test suite in 86a64b6

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

Successfully merging this pull request may close these issues.

4 participants