guard against null elements in the drive
This commit is contained in:
@@ -506,8 +506,14 @@ define([
|
||||
var fixRoot = function (elem) {
|
||||
if (typeof(files[ROOT]) !== "object") { debug("ROOT was not an object"); files[ROOT] = {}; }
|
||||
var element = elem || files[ROOT];
|
||||
if (!element) { return console.error("Invalid element in root");
|
||||
var nbMetadataFolders = 0;
|
||||
for (var el in element) {
|
||||
if (element[el] === null) {
|
||||
console.error('element[%s] is null', el);
|
||||
delete element[el];
|
||||
continue;
|
||||
}
|
||||
if (exp.isFolderData(element[el])) {
|
||||
if (nbMetadataFolders !== 0) {
|
||||
debug("Multiple metadata files in folder");
|
||||
|
||||
Reference in New Issue
Block a user