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

Fix issue with hardcoded local to en_US #16

Merged
merged 2 commits into from
Apr 28, 2020

Conversation

JavierDuarteC
Copy link
Contributor

_LinkedInLocalInfo updated getting the first value of json map, avoiding error if user has no en_US name.

 _LinkedInLocalInfo updated getting the first value of json map, avoiding error if user has no en_US name.
@JavierDuarteC
Copy link
Contributor Author

Please, i need this change ASAP

@@ -68,7 +68,7 @@ class _LinkedInLocalInfo {

factory _LinkedInLocalInfo.fromJson(Map<String, dynamic> json) =>
_LinkedInLocalInfo(
label: json['en_US'], // possible error
label: json.values.toList()[0], // possible error
Copy link
Owner

Choose a reason for hiding this comment

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

We need a more secure way. Hardcoding can produce the same issue in this place. I will add more lines, so that we can merge it.

@d3xt3r2909 d3xt3r2909 changed the title Update linked_in_user_model.dart class Fix issue with hardcoded local to en_US Apr 28, 2020
@d3xt3r2909 d3xt3r2909 self-requested a review April 28, 2020 09:05
@d3xt3r2909 d3xt3r2909 merged commit 9fde7d6 into d3xt3r2909:master Apr 28, 2020
@JavierDuarteC JavierDuarteC deleted the patch-1 branch April 28, 2020 16:14
@santaanto santaanto mentioned this pull request Nov 30, 2020
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.

2 participants