-
Notifications
You must be signed in to change notification settings - Fork 33
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
Make this addon FastBoot compatible #28
Conversation
Isn't this a dupe of #26? |
@kratiahuja No, apart from the build exclusion, I've handled couple of other places where there were errors in fastboot mode. |
|
||
export const isClipboardSupported = Clipboard.isSupported; | ||
export const isClipboardSupported = window.Clipboard ? window.Clipboard.isSupported: () => false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make this the following:
window && window.Clipboard ? window.Clipboard.isSupported : () => false;
The docs suggest testing for the presence of window
https://ember-fastboot.com/docs/addon-author-guide#how-to-fix-it
@sivakumar-kailasam thanks for this PR. I have one comment. Otherwise, changes LGTM. After this PR lands, I will cut a release with an ember-cli upgrade and add fastboot as a dev dependency for the dummy app. |
Made the changes @jkusa. @kratiahuja out of curiosity in test mode, can we turn off fastboot mode via some config? Because tests might have different results for client side vs fastboot mode. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Yeah you can turnoff fastboot via adding a query Param ?fastboot=false |
Tested on an actual app.