Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8415064

Browse files
Reinstate unintentionally deleted code.
1 parent 8ff1aef commit 8415064

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/settings.coffee

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ Settings =
66
onLoadedCallbacks: []
77

88
init: ->
9+
if Utils.isExtensionPage()
10+
# On extension pages, we use localStorage (or a copy of it) as the cache.
11+
@cache = if Utils.isBackgroundPage() then localStorage else extend {}, localStorage
12+
@onLoaded()
13+
914
chrome.storage.local.get null, (localItems) =>
1015
localItems = {} if chrome.runtime.lastError
1116
@storage.get null, (syncedItems) =>

0 commit comments

Comments
 (0)