Skip to content

Commit

Permalink
refactor(api/internal/pickers.js): prefer IPC extension when available
Browse files Browse the repository at this point in the history
  • Loading branch information
jwerle committed Jun 13, 2024
1 parent 2a5ce96 commit 83f9cc5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions api/internal/pickers.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,12 @@ function normalizeShowFileSystemPickerOptions (options) {

return {
contentTypeSpecs: contentTypeSpecs.join('|'),
prefersDarkMode: globalThis?.matchMedia?.('(prefers-color-scheme: dark)')?.matches || false,
allowMultiple: options?.multiple === true,
defaultName: options?.suggestedName ?? '',
defaultPath: resolveStartInPath(options?.startIn, options?.id) ?? '',
// eslint-disable-next-line
allowFiles: options?.files === true ? true : false,
// eslint-disable-next-line
allowDirs: options?.directories === true ? true : false
allowFiles: options?.files === true,
allowDirs: options?.directories === true
}
}

Expand All @@ -141,6 +140,7 @@ function normalizeShowFileSystemPickerOptions (options) {
* mode?: 'read' | 'readwrite'
* startIn?: FileSystemHandle | 'desktop' | 'documents' | 'downloads' | 'music' | 'pictures' | 'videos',
* }} ShowDirectoryPickerOptions
*
*/

/**
Expand Down

0 comments on commit 83f9cc5

Please sign in to comment.