From 1540ae3f6f669662f939a0892a1a10e879caaa5d Mon Sep 17 00:00:00 2001 From: yflory Date: Fri, 17 Feb 2017 15:16:30 +0100 Subject: [PATCH] Fix issue with null entries in Cryptpad_RECENTPADS --- www/common/cryptpad-common.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/www/common/cryptpad-common.js b/www/common/cryptpad-common.js index af5fca0f3..a18731c26 100644 --- a/www/common/cryptpad-common.js +++ b/www/common/cryptpad-common.js @@ -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; }); };