Deal with item.tags missing a sort method

This commit is contained in:
Simon Kornblith 2012-03-12 21:38:04 -04:00
parent ba96aff194
commit 64c8f04644

View file

@ -245,7 +245,7 @@ Zotero_TranslatorTester._sanitizeItem = function(item, forSave) {
if("accessDate" in item) delete item.accessDate;
//sort tags, if they're still there
if(item.tags) item.tags.sort();
if(item.tags && typeof item.tags === "object" && "sort" in item.tags) item.tags.sort();
return item;
};