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

Make this addon FastBoot compatible #28

Merged
merged 2 commits into from
Jul 7, 2017
Merged

Make this addon FastBoot compatible #28

merged 2 commits into from
Jul 7, 2017

Conversation

sivakumar-kailasam
Copy link
Contributor

@sivakumar-kailasam sivakumar-kailasam commented Jun 29, 2017

Tested on an actual app.

@kratiahuja
Copy link

Isn't this a dupe of #26?

@sivakumar-kailasam
Copy link
Contributor Author

@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;
Copy link
Owner

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

@jkusa
Copy link
Owner

jkusa commented Jul 4, 2017

@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.

@sivakumar-kailasam
Copy link
Contributor Author

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.

Copy link
Owner

@jkusa jkusa left a comment

Choose a reason for hiding this comment

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

👍

@jkusa jkusa merged commit 1e4bbc4 into jkusa:master Jul 7, 2017
@sivakumar-kailasam sivakumar-kailasam deleted the fastboot-prep branch July 7, 2017 18:11
@kratiahuja
Copy link

Yeah you can turnoff fastboot via adding a query Param ?fastboot=false

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

3 participants