-
Notifications
You must be signed in to change notification settings - Fork 4.4k
fix(cfn-diff): correctly handle Date strings in diff #16591
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
Conversation
924c117 to
ebfd5f2
Compare
Turns out, `parseFloat()` in JavaScript is even crazier than we thought, and returns nonsense like `2021` for a string containing a Date like `'2021-10-25'`. For that reason, add an explicit check that the string parsed looks like a number before calling `parseFloat()`. Fixes aws#16444
4d6c8aa to
bc05dfc
Compare
|
@rix0rrr incorporated your comments, would appreciate another pass! |
|
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
|
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Turns out, `parseFloat()` in JavaScript is even crazier than we thought, and returns nonsense like `2021` for a string containing a Date like `'2021-10-25'`. For that reason, add an explicit check that the string parsed looks like a number before calling `parseFloat()`. Fixes aws#16444 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Turns out,
parseFloat()in JavaScript is even crazier than we thought,and returns nonsense like
2021for a string containing a Date like'2021-10-25'.For that reason, add an explicit check that the string parsed looks like a number before calling
parseFloat().Fixes #16444
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license