diff --git a/omega-target-chromium-extension/src/tabs.coffee b/omega-target-chromium-extension/src/tabs.coffee index cac9de3..d51b6d5 100644 --- a/omega-target-chromium-extension/src/tabs.coffee +++ b/omega-target-chromium-extension/src/tabs.coffee @@ -41,7 +41,10 @@ class ChromeTabs @_badgeTab = null if not tab.url? or tab.url.indexOf("chrome") == 0 if @_defaultAction - chrome.browserAction.setTitle(title: @_defaultAction.title, tabId: tab.id) + chrome.browserAction.setTitle({ + title: @_defaultAction.title + tabId: tab.id + }) @clearIcon tab.id return @actionForUrl(tab.url).then (action) => diff --git a/omega-target/src/options.coffee b/omega-target/src/options.coffee index 72cc6fd..9fc2c33 100644 --- a/omega-target/src/options.coffee +++ b/omega-target/src/options.coffee @@ -619,6 +619,10 @@ class Options url = OmegaPac.Profiles.updateUrl(profile) if url results[key] = @fetchUrl(url, opt_bypass_cache).then((data) => + # Errors and unsuccessful response codes shoud have been already + # rejected by fetchUrl and will not end up here. + # So empty data indicates success without any update (e.g. 304). + return profile unless data profile = OmegaPac.Profiles.byKey(key, @_options) profile.lastUpdate = new Date().toISOString() if OmegaPac.Profiles.update(profile, data)