Fix issue with null entries in Cryptpad_RECENTPADS

pull/1/head
yflory 8 years ago
parent dd014f6ef2
commit 1540ae3f6f

@ -351,7 +351,7 @@ define([
title: pad[2] || hash && hash.slice(0,8),
ctime: pad[1],
};
} else if (typeof(pad) === 'object') {
} else if (pad && typeof(pad) === 'object') {
if (!pad.ctime) { pad.ctime = pad.atime; }
if (!pad.title) {
pad.href.replace(/#(.*)$/, function (x, hash) {
@ -367,7 +367,7 @@ define([
} else {
console.error("[Cryptpad.migrateRecentPads] pad had unexpected value");
console.log(pad);
return {};
return;
}
}).filter(function (x) { return x; });
};

Loading…
Cancel
Save