ember-useragent
ember-useragent copied to clipboard
Pre-render for Fastboot and User Agent
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?
Did you ever find a workable solution for this? It appears i'm facing the same challenge