diff --git a/www/drive/main.js b/www/drive/main.js index 52a1179bf..13a8c5b66 100644 --- a/www/drive/main.js +++ b/www/drive/main.js @@ -1055,13 +1055,14 @@ define([ var e = useData ? element : filesOp.getFileData(element); if (!e) { e = { + href : el, title : Messages.fm_noname, atime : 0, ctime : 0 }; } if (prop === 'type') { - var hrefData = Cryptpad.parsePadUrl(el); + var hrefData = Cryptpad.parsePadUrl(e.href); return hrefData.type; } if (prop === 'atime' || prop === 'ctime') { @@ -1092,11 +1093,16 @@ define([ var e = filesOp.getFileData(element); if (!e) { e = { + href : el, title : Messages.fm_noname, atime : 0, ctime : 0 }; } + if (prop === 'type') { + var hrefData = Cryptpad.parsePadUrl(e.href); + return hrefData.type; + } if (prop === 'atime' || prop === 'ctime') { return new Date(e[prop]); }