aboutsummaryrefslogtreecommitdiffstats
path: root/lib/settings.coffee
diff options
context:
space:
mode:
Diffstat (limited to 'lib/settings.coffee')
-rw-r--r--lib/settings.coffee4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/settings.coffee b/lib/settings.coffee
index c127343d..8b7f6062 100644
--- a/lib/settings.coffee
+++ b/lib/settings.coffee
@@ -18,10 +18,10 @@ Settings =
onLoadedCallbacks: []
init: ->
- if Utils.isExtensionPage() and (try localStorage)
+ if Utils.isExtensionPage() and Utils.isExtensionPage window.top
# On extension pages, we use localStorage (or a copy of it) as the cache.
# For UIComponents (or other content of ours in an iframe within a regular page), we can't access
- # localStorage, so we check for this too.
+ # localStorage, so we check that the top level frame is also an extension page.
@cache = if Utils.isBackgroundPage() then localStorage else extend {}, localStorage
@onLoaded()