Skip to content
This repository has been archived by the owner on Jan 23, 2024. It is now read-only.

Commit

Permalink
fall back from idb to servers when 0 tracks are seen [closes #47]
Browse files Browse the repository at this point in the history
  • Loading branch information
simon-weber committed Mar 4, 2016
1 parent 4fd9ac3 commit c9cf34e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/js/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ function initLibrary(userId) {

const message = {action: 'getLocalTracks', userId};
chrome.tabs.sendMessage(users[userId].tabId, message, Chrometools.unlessError(response => {
if (response.tracks === null) {
if (response.tracks === null || response.tracks.length === 0) {
// problem with indexeddb, fall back to update from 0.
diffUpdateLibrary(userId, 0, () => null);
} else {
Expand Down

0 comments on commit c9cf34e

Please sign in to comment.