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: checking navigator type before to determine isMacOs #340

Merged
merged 2 commits into from
May 5, 2021

Conversation

rolancia
Copy link
Contributor

@rolancia rolancia commented May 4, 2021

This PR contains:

  • bugfix
  • feature
  • refactor
  • tests
  • documentation
  • others

Breaking Changes?

  • yes
  • no

Checklist

  • commit messages follow the Conventional Commits pattern
    • A feature commit message is prefixed "feat:"
    • A bugfix commit message is prefixed "fix:"
    • A document related commit is prefixed "docs:"
  • docs have been added / updated (for bug fixes / features)

Describe Your Changes

Adds checking for /Mac/.test(navigator.platform) to avoid the error 'navigator is not defined' with SSR.

Does this PR affects any existing issues?

  • yes
  • no

@sibiraj-s
Copy link
Owner

This will fix the crash, but it will always use the other shortcut in MacOs. That is fine?

@rolancia
Copy link
Contributor Author

rolancia commented May 5, 2021

i don't understand why it makes the problem.
(sorry, am not familiar with Angular, other web side neither)

but if it does, using Angular core library also is a good way to detect platform?

@sibiraj-s
Copy link
Owner

You should be able to detect platform from the request body. You can read more information regarding that here https://angular.io/guide/universal.

I will merge this.

@sibiraj-s sibiraj-s merged commit 2a58a3a into sibiraj-s:master May 5, 2021
@rolancia
Copy link
Contributor Author

rolancia commented May 5, 2021

thank you!

@rolancia
Copy link
Contributor Author

rolancia commented May 5, 2021

oh. you deployed it.. appreciate

@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in the thread.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants