Bad JSON in sync cache shouldn't break syncing
https://forums.zotero.org/discussion/95926/zotero-not-syncing-report-id-1924846177
This commit is contained in:
parent
5c8ea0174a
commit
3f10e4c064
1 changed files with 8 additions and 1 deletions
|
@ -667,7 +667,14 @@ Zotero.Sync.Data.Local = {
|
|||
+ "syncObjectTypes WHERE name=?)";
|
||||
var data = yield Zotero.DB.valueQueryAsync(sql, [libraryID, key, version, objectType]);
|
||||
if (data) {
|
||||
return JSON.parse(data);
|
||||
try {
|
||||
return JSON.parse(data);
|
||||
}
|
||||
// Shouldn't happen, but don't break syncing if it does
|
||||
// https://forums.zotero.org/discussion/95926/zotero-not-syncing-report-id-1924846177
|
||||
catch (e) {
|
||||
Zotero.logError(e);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}),
|
||||
|
|
Loading…
Reference in a new issue