Fix additional translatorCache problems at startup
This commit is contained in:
parent
10ca281c47
commit
3a8fd4d942
1 changed files with 5 additions and 7 deletions
|
@ -782,9 +782,12 @@ Zotero.Schema = new function(){
|
||||||
// If there's anything in the cache, see what we actually need to extract
|
// If there's anything in the cache, see what we actually need to extract
|
||||||
for (let i = 0; i < rows.length; i++) {
|
for (let i = 0; i < rows.length; i++) {
|
||||||
let json = rows[i].metadataJSON;
|
let json = rows[i].metadataJSON;
|
||||||
let metadata;
|
|
||||||
try {
|
try {
|
||||||
metadata = JSON.parse(json);
|
let metadata = JSON.parse(json);
|
||||||
|
let id = metadata.translatorID;
|
||||||
|
if (index[id] && index[id].lastUpdated <= metadata.lastUpdated) {
|
||||||
|
index[id].extract = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
Zotero.logError(e);
|
Zotero.logError(e);
|
||||||
|
@ -795,11 +798,6 @@ Zotero.Schema = new function(){
|
||||||
"DELETE FROM translatorCache WHERE rowid=?",
|
"DELETE FROM translatorCache WHERE rowid=?",
|
||||||
rows[i].rowid
|
rows[i].rowid
|
||||||
);
|
);
|
||||||
continue;
|
|
||||||
}
|
|
||||||
let id = metadata.translatorID;
|
|
||||||
if (index[id] && index[id].lastUpdated <= metadata.lastUpdated) {
|
|
||||||
index[id].extract = false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue