Skip to content

Commit

Permalink
fix(file-picker): pickFiles (...) doesn't work first time on Safari (
Browse files Browse the repository at this point in the history
…capawesome-team#111)

* bug(file-picker): pickFiles on Safari web does not bring up file picker on first call capawesome-team#14

* npm run fmt

* Apply suggestions from code review

Co-authored-by: Robin Genz <[email protected]>

* Update packages/file-picker/src/index.ts

Co-authored-by: Robin Genz <[email protected]>

* cleanup

---------

Co-authored-by: Robin Genz <[email protected]>
  • Loading branch information
stephan-fischer and robingenz authored Dec 30, 2023
1 parent 777fff5 commit 154fb47
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/funny-taxis-tie.md
Original file line number Diff line number Diff line change
@@ -0,0 1,5 @@
---
'@capawesome/capacitor-file-picker': patch
---

fix(web): `pickFiles (...)` doesn't work first time on Safari
4 changes: 3 additions & 1 deletion packages/file-picker/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 1,11 @@
import { registerPlugin } from '@capacitor/core';

import type { FilePickerPlugin } from './definitions';
// See https://github.com/capawesome-team/capacitor-plugins/issues/14
import * as web from './web';

const FilePicker = registerPlugin<FilePickerPlugin>('FilePicker', {
web: () => import('./web').then(m => new m.FilePickerWeb()),
web: () => new web.FilePickerWeb(),
});

export * from './definitions';
Expand Down

0 comments on commit 154fb47

Please sign in to comment.