diff --git a/www/common/outer/userObject.js b/www/common/outer/userObject.js index aee238007..b9c9197fa 100644 --- a/www/common/outer/userObject.js +++ b/www/common/outer/userObject.js @@ -645,7 +645,7 @@ define([ } // Fix href - if (/^https*:\/\//.test(el.href)) { el.href = Hash.getRelativeHref(el.href); } + if (el.href && /^https*:\/\//.test(el.href)) { el.href = Hash.getRelativeHref(el.href); } // Fix creation time if (!el.ctime) { el.ctime = el.atime; } // Fix title diff --git a/www/drive/inner.js b/www/drive/inner.js index ad3acff4d..042efa7a6 100644 --- a/www/drive/inner.js +++ b/www/drive/inner.js @@ -2622,6 +2622,7 @@ define([ sortedFiles.forEach(function (key) { if (manager.isFolder(root[key])) { return; } var $element = createElement(path, key, root, false); + if (!$element) { return; } $element.appendTo($list); });