Skip to content

Commit

Permalink
Fixed getting block set data from cloud (reverted to old way)
Browse files Browse the repository at this point in the history
  • Loading branch information
eero-lehtinen committed Apr 21, 2019
1 parent ea0224d commit f4911cc
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions js/bg.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,15 @@ function loadBlocksets() {
chrome.storage.sync.get({
[blocksetId]: defaultBlockset(blocksetId)
}, (data) => {
blocksetDatas[blocksetId] = data[blocksetId];
addAbsentItems(blocksetDatas[blocksetId], defaultBlockset(blocksetId));
generateLookUp(blocksetId);
var bsId = Object.keys(data)[0];
blocksetDatas[bsId] = data[bsId];
addAbsentItems(blocksetDatas[bsId], defaultBlockset(bsId));
generateLookUp(bsId);

// time elapsed saving changed in 1.1.0
if (isUpdated && previousVersion.includes("1.0.")) {
blocksetTimesElapsed[blocksetId] = blocksetDatas[blocksetId].timeElapsed;
delete blocksetDatas[blocksetId].timeElapsed;
blocksetTimesElapsed[bsId] = blocksetDatas[bsId].timeElapsed;
delete blocksetDatas[bsId].timeElapsed;
}

k++;
Expand Down

0 comments on commit f4911cc

Please sign in to comment.