Skip to content

Fix device support #533

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

liborm85
Copy link

@liborm85 liborm85 commented Mar 9, 2019

This PR fixed support for mobile device.
Application in React throw error Can't find variable: HTMLAnchorElement on mobile device.

Original pdfmake issue with example: bpampuch/pdfmake#1664

@jimmywarting
Copy link
Collaborator

jimmywarting commented Mar 19, 2019

HTMLAnchorElement is such a basic element and have existed for a long time.
Seems like you are running filesaver in a react-native app?

react-native is not a web application and as such i don't think filesaver will not work at all.

The question i have is how you manage to surpass this condition...

(typeof window !== 'object' || window !== _global)
? function saveAs () { /* noop */ }

maybe in react native saveAs should only be a noop function?

@liborm85
Copy link
Author

This is fix for issue from bpampuch/pdfmake#1664 more information can be provided by @dancomanlive and @PatrickCavalcanti

Copy link
Contributor

@Uzlopak Uzlopak left a comment

Choose a reason for hiding this comment

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

The typeof-check doesnt seem to be overexcessive.

@blikblum
Copy link

Any chance to this get merged?

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.

4 participants