Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions packages/pinia/src/devtools/file-saver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,10 @@ export type SaveAs =

export const saveAs: SaveAs = !IS_CLIENT
? () => {} // noop
: // Use download attribute first if possible (#193 Lumia mobile) unless this is a macOS WebView
'download' in HTMLAnchorElement.prototype && !isMacOSWebView
: // Use download attribute first if possible (#193 Lumia mobile) unless this is a macOS WebView or mini program
typeof HTMLAnchorElement !== 'undefined' &&
'download' in HTMLAnchorElement.prototype &&
!isMacOSWebView
? downloadSaveAs
: // Use msSaveOrOpenBlob as a second approach
'msSaveOrOpenBlob' in _navigator
Expand Down