image sync fixes and 4.0.0 electron

This commit is contained in:
azivner
2018-12-22 09:54:09 +01:00
parent cbec85f295
commit e9a77f3f16
5 changed files with 25 additions and 16 deletions

View File

@@ -252,7 +252,10 @@ async function getEntityRow(entityName, entityId) {
const entity = await sql.getRow(`SELECT * FROM ${entityName} WHERE ${primaryKey} = ?`, [entityId]);
if (entityName === 'notes' && (entity.type === 'file' || entity.type === 'image')) {
if (entityName === 'notes'
&& entity.content !== null
&& (entity.type === 'file' || entity.type === 'image')) {
entity.content = entity.content.toString("binary");
}