Fix rgb to hex color conversion

This commit is contained in:
Tom Najdek 2021-05-13 21:47:03 +02:00 committed by Dan Stillman
parent 833ee10516
commit 808b71832e

View file

@ -847,7 +847,9 @@ Zotero_Import_Mendeley.prototype._getDocumentAnnotationsAPI = async function (gr
const annotation = {
id: a.id,
color: a.color ? `#${a.color.r.toString(16)}${a.color.g.toString(16)}${a.color.b.toString(16)}` : null,
color: a.color
? `#${a.color.r.toString(16).padStart(2, '0')}${a.color.g.toString(16).padStart(2, '0')}${a.color.b.toString(16).padStart(2, '0')}`
: null,
dateAdded: a.created,
dateModified: a.last_modified,
hash: a.filehash,