From: Artur Adib Date: Tue, 24 Jan 2012 15:39:57 +0000 (-0500) Subject: Workaround for FF bug X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=843830cea0be94083f66bf65f525d66fe097fa61;p=pdf.js.git Workaround for FF bug --- diff --git a/web/viewer.js b/web/viewer.js index 87f1c4b..11c0769 100644 --- a/web/viewer.js +++ b/web/viewer.js @@ -62,13 +62,16 @@ var RenderingQueue = (function RenderingQueueClosure() { })(); // Settings Manager - This is a utility for saving settings -// First we see if localStorage is available, FF bug #495747 +// First we see if localStorage is available // If not, we use FUEL in FF var Settings = (function SettingsClosure() { var isLocalStorageEnabled = (function localStorageEnabledTest() { // Feature test as per http://diveintohtml5.info/storage.html + // The additional localStorage call is to get around a FF quirk, see + // bug #495747 in bugzilla try { - return 'localStorage' in window && window['localStorage'] !== null; + return 'localStorage' in window && window['localStorage'] !== null && + localStorage; } catch (e) { return false; }