[
https://issues.apache.org/jira/browse/CB-14181?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16528852#comment-16528852
]
ASF GitHub Bot commented on CB-14181:
-------------------------------------
jcesarmobile closed pull request #235: CB-14181: (android) Fix bug - Cannot
read property 'filesystemName' of null
URL: https://github.com/apache/cordova-plugin-file/pull/235
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/www/fileSystems-roots.js b/www/fileSystems-roots.js
index 9a3fc7a..b15adbd 100644
--- a/www/fileSystems-roots.js
+++ b/www/fileSystems-roots.js
@@ -30,8 +30,10 @@ require('./fileSystems').getFs = function (name, callback) {
fsMap = {};
for (var i = 0; i < response.length; ++i) {
var fsRoot = response[i];
- var fs = new FileSystem(fsRoot.filesystemName, fsRoot);
- fsMap[fs.name] = fs;
+ if (fsRoot) {
+ var fs = new FileSystem(fsRoot.filesystemName, fsRoot);
+ fsMap[fs.name] = fs;
+ }
}
callback(fsMap[name]);
}
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> Cannot read property 'filesystemName' of null
> ---------------------------------------------
>
> Key: CB-14181
> URL: https://issues.apache.org/jira/browse/CB-14181
> Project: Apache Cordova
> Issue Type: Bug
> Components: cordova-plugin-file
> Affects Versions: [email protected]
> Environment: cordova 7.1.0
> Reporter: ari
> Priority: Major
> Labels: easyfix
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> Error in Success callbackId: File1539060614 : TypeError: Cannot read property
> 'filesystemName' of null
> cordova.js:314 Uncaught TypeError: Cannot read property 'filesystemName' of
> null
> The `fsRoot` might be null. reproduced with latest cordova on android
> emulator.
>
> This is the problematic line :
> [https://github.com/apache/cordova-plugin-file/blob/master/www/fileSystems-roots.js#L33]
> PR : https://github.com/apache/cordova-plugin-file/pull/235
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]