Skip to content

Commit 47fd239

Browse files
committed
fix client-side caching
1 parent 21637dc commit 47fd239

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

clients/chrome/js/magic.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ velvetLinks.each(function(e) {
1010
}
1111
});
1212

13+
1314
var key = hash(Array.from(urls).join()).toString();
1415
chrome.storage.local.get(key, function(result) {
1516
if(key in result) {
@@ -21,7 +22,7 @@ chrome.storage.local.get(key, function(result) {
2122
chrome.storage.local.clear();
2223

2324
var scores = response.scores;
24-
if(!hasNullValue(scores)) {
25+
if(!hasNullValue(scores) && urls.size === Object.keys(scores).length) {
2526
var value = {}; value[key] = scores;
2627
chrome.storage.local.set(value);
2728
}

0 commit comments

Comments
 (0)