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

Move file system operations to separate module #510

Merged
merged 1 commit into from Jan 22, 2020
Merged

Conversation

tomayac
Copy link
Member

@tomayac tomayac commented Jan 22, 2020

  • Instead of doing the feature detection inline, this is now outsourced to browser-nativefs, which makes the code a lot easier to read. This new library dynamically imports only the relevant code path (legacy or Native File System API), albeit this advantage is down-transpiled at the moment.

  • Add two missing fields to package.json.

@vercel
Copy link

@vercel vercel bot commented Jan 22, 2020

This pull request is being automatically deployed with ZEIT Now (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://zeit.co/vjeux/excalidraw/8476dp23e
Preview: https://excalidraw-git-browser-nativefs.vjeux.now.sh

@tomayac tomayac merged commit d1fb824 into master Jan 22, 2020
8 checks passed
@tomayac tomayac deleted the browser-nativefs branch Jan 22, 2020

input.onchange = () => {
if (!input.files!.length) {
alert("A file was not selected.");
Copy link
Member

@dwelle dwelle Jan 22, 2020

Choose a reason for hiding this comment

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

We've lost this error handling one alongside this PR. (Also reading the package source, it seems you're not doing this check at all. Is that intentional?).

Copy link
Member Author

@tomayac tomayac Jan 22, 2020

Choose a reason for hiding this comment

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

@dwelle dwelle mentioned this pull request Jan 22, 2020
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

2 participants