diff --git a/src/becca/entities/battachment.ts b/src/becca/entities/battachment.ts index ab90d345f2..c6b8d70769 100644 --- a/src/becca/entities/battachment.ts +++ b/src/becca/entities/battachment.ts @@ -98,7 +98,7 @@ class BAttachment extends AbstractBeccaEntity { /** @returns true if the note has string content (not binary) */ hasStringContent(): boolean { - return this.type !== undefined && utils.isStringNote(this.type, this.mime); + return utils.isStringNote(this.type, this.mime); // here was !== undefined && utils.isStringNote(this.type, this.mime); I dont know why we need !=undefined. But it filters out canvas libary items } isContentAvailable() { diff --git a/src/public/app/widgets/type_widgets/canvas.js b/src/public/app/widgets/type_widgets/canvas.js index 08f7128e38..0c3d2ffd69 100644 --- a/src/public/app/widgets/type_widgets/canvas.js +++ b/src/public/app/widgets/type_widgets/canvas.js @@ -2,7 +2,7 @@ import libraryLoader from '../../services/library_loader.js'; import TypeWidget from './type_widget.js'; import utils from '../../services/utils.js'; import linkService from '../../services/link.js'; - +import server from '../../services/server.js'; const TPL = `