Skip to content

Commit

Permalink
https://github.com/apache/cordova-plugin-file/issues/334
Browse files Browse the repository at this point in the history
  • Loading branch information
regnete committed Aug 23, 2023
1 parent 89ee2c6 commit 8c823bc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/browser/FileProxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

// For chrome we don't need to implement proxy methods
// All functionality can be accessed natively.
if (require('./isChrome')()) {
if ((cordova.platformId === 'browser' || cordova.platformId === 'electron') && require('./isChrome')()) {
const pathsPrefix = {
// Read-only directory where the application is installed.
applicationDirectory: location.origin + '/', // eslint-disable-line no-undef
Expand Down
2 changes: 1 addition & 1 deletion www/resolveLocalFileSystemURI.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
(function () {
// For browser platform: not all browsers use overrided `resolveLocalFileSystemURL`.
function checkBrowser () {
if (cordova.platformId === 'browser' && require('./isChrome')()) {
if ((cordova.platformId === 'browser' || cordova.platformId === 'electron') && require('./isChrome')()) {
module.exports.resolveLocalFileSystemURL = window.resolveLocalFileSystemURL || window.webkitResolveLocalFileSystemURL;
return true;
}
Expand Down

0 comments on commit 8c823bc

Please sign in to comment.