-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Conversation
There was a problem hiding this 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
There was a problem hiding this 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?
Sorry for the delay. Would you mind adding a test? |
@sorvell I have added the test case and updated the pull request |
There was a problem hiding this 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); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 😄
I manually updated the test suite in 86a64b6 |
Fixes #4696: Issue with DeSerialization of Date