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: Guard undefined OS #4619

Merged
merged 2 commits into from Sep 20, 2018
Merged

fix: Guard undefined OS #4619

merged 2 commits into from Sep 20, 2018

Conversation

Yserz
Copy link
Contributor

@Yserz Yserz commented Sep 20, 2018

No description provided.

@Yserz Yserz self-assigned this Sep 20, 2018
const getUserAgent = () => getPlatform().ua.toLowerCase();

const getOsFamily = () => getOs().family.toLowerCase();
const getOsFamily = () => (getOs().family || '').toLowerCase();
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we should put the guard as the default object in l58 instead of touching many lines

Copy link
Contributor Author

@Yserz Yserz Sep 20, 2018

Choose a reason for hiding this comment

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

That doesn't cater for cases where os is defined but single values are null.

@Yserz Yserz merged commit 667fcd0 into dev Sep 20, 2018
@Yserz Yserz deleted the fix/undefined-os branch September 20, 2018 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants