From 30f66ab7ba9009026ceb2d43a7b0210d6719064f Mon Sep 17 00:00:00 2001 From: ansuz Date: Wed, 31 May 2017 18:44:44 +0200 Subject: [PATCH] hotfix 'undefined/' bug --- www/common/cryptpad-common.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/www/common/cryptpad-common.js b/www/common/cryptpad-common.js index 20927dc04..794555ed8 100644 --- a/www/common/cryptpad-common.js +++ b/www/common/cryptpad-common.js @@ -242,6 +242,11 @@ define([ var getUserHash = common.getUserHash = function () { var hash = localStorage[userHashKey]; + if (['undefined', 'undefined/'].indexOf(hash) !== -1) { + localStorage.removeItem(userHashKey); + return; + } + if (hash) { var sHash = common.serializeHash(hash); if (sHash !== hash) { localStorage[userHashKey] = sHash; }