fixed entry attachments display

This commit is contained in:
antelle 2021-05-08 21:00:38 +02:00
parent 0e1b086096
commit b4459e1247
No known key found for this signature in database
GPG Key ID: 63C9777AAB7C563C
3 changed files with 6 additions and 3 deletions

View File

@ -3,10 +3,10 @@ import { Model } from 'framework/model';
class AttachmentModel extends Model { class AttachmentModel extends Model {
getBinary() { getBinary() {
let data = this.data; let data = this.data;
if (data && data.ref) { if (data?.value) {
data = data.value; data = data.value;
} }
if (data && data.getBinary) { if (data?.getBinary) {
data = data.getBinary(); data = data.getBinary();
} }
if (data instanceof ArrayBuffer && data.byteLength) { if (data instanceof ArrayBuffer && data.byteLength) {

View File

@ -357,7 +357,7 @@ class EntryModel extends Model {
addAttachment(name, data) { addAttachment(name, data) {
this._entryModified(); this._entryModified();
return this.file.db.createBinary(data).then((binaryRef) => { return this.file.db.createBinary(data).then((binaryRef) => {
this.entry.binaries[name] = binaryRef; this.entry.binaries.set(name, binaryRef);
this._fillByEntry(); this._fillByEntry();
}); });
} }

View File

@ -1,5 +1,8 @@
Release notes Release notes
------------- -------------
##### v1.18.1 (2021-05-08)
`-` fixed entry attachments display
##### v1.18.0 (2021-05-08) ##### v1.18.0 (2021-05-08)
`+` browser extension "KeeWeb Connect" `+` browser extension "KeeWeb Connect"
`+` support for KeePassXC-Browser `+` support for KeePassXC-Browser