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

Pre-render for Fastboot and User Agent #38

Open
hbrysiewicz opened this issue Apr 21, 2020 · 1 comment
Open

Pre-render for Fastboot and User Agent #38

hbrysiewicz opened this issue Apr 21, 2020 · 1 comment

Comments

@hbrysiewicz
Copy link

I am using Prember with Fastboot, which does not seem to provide a user-agent when generating pages on build. This causes an error when the page it is trying to build is using the hbs helpers for user-agent.

pre-render / failed with exception: Error: Assertion Failed: No `user-agent` present in FastBoot headers.
{{#if (or (user-agent "device.isMobile") (user-agent "device.isTablet"))}}
  <MobileComponent />
{{/if}}

Is it possible to make ember-useragent not fail when no user-agent is present, but rather just return false for these helpers? Or maybe this is a Prember issue in that it should be providing some kind of user agent?

@genisd
Copy link

genisd commented Jan 12, 2021

Did you ever find a workable solution for this?
It appears i'm facing the same challenge

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

No branches or pull requests

2 participants