From 3c0806659b01697fa58f64d7ca08724023711436 Mon Sep 17 00:00:00 2001 From: Caleb James DeLisle Date: Mon, 18 Dec 2017 18:28:48 +0100 Subject: [PATCH] Better logging if we trigger the doc emptystring issue --- www/common/boot2.js | 18 ------------------ www/common/sframe-app-framework.js | 2 ++ 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/www/common/boot2.js b/www/common/boot2.js index ec1724eb2..ec3b3d7db 100644 --- a/www/common/boot2.js +++ b/www/common/boot2.js @@ -22,24 +22,6 @@ define([ } var failStore = function () { - if (document.cookie.indexOf('test=') === 0) { - // We're testing in safari and safaridriver runs everything in a private window - // However, for our tests nothing lasts more than a single page load so we can - // stub the localStorage - - // This is shamelessly copy/pasted from sframe-boot2.js :( - var mkFakeStore = function () { - var fakeStorage = { - getItem: function (k) { return fakeStorage[k]; }, - setItem: function (k, v) { fakeStorage[k] = v; return v; }, - removeItem: function (k) { delete fakeStorage[k]; } - }; - return fakeStorage; - }; - window.__defineGetter__('localStorage', function () { return mkFakeStore(); }); - window.__defineGetter__('sessionStorage', function () { return mkFakeStore(); }); - return; - } console.error(new Error('wut')); require(['jquery'], function ($) { $.ajax({ diff --git a/www/common/sframe-app-framework.js b/www/common/sframe-app-framework.js index 88a8a36bd..a6258b32d 100644 --- a/www/common/sframe-app-framework.js +++ b/www/common/sframe-app-framework.js @@ -259,6 +259,8 @@ define([ // We're getting 'new pad' but there is an existing file // We don't know exactly why this can happen but under no circumstances // should we overwrite the content, so lets just try again. + console.log("userDoc is '' but this is not a new pad, something is " + + "terribly wrong, reloading."); common.gotoURL(); return; }