mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 969511 - Don't update snippets cache unless the update timer fired. r=wesj
This commit is contained in:
parent
a0406ffb0f
commit
d492880938
@ -136,9 +136,8 @@ function cacheSnippets(response) {
|
||||
function loadSnippetsFromCache() {
|
||||
let promise = OS.File.read(gSnippetsPath);
|
||||
promise.then(array => updateBanner(gDecoder.decode(array)), e => {
|
||||
// If snippets.json doesn't exist, update data from the server.
|
||||
if (e instanceof OS.File.Error && e.becauseNoSuchFile) {
|
||||
update();
|
||||
Cu.reportError("Couldn't show snippets because cache does not exist yet.");
|
||||
} else {
|
||||
Cu.reportError("Error loading snippets from cache: " + e);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user