diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2019-05-16 17:04:43 +0200 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2019-05-16 17:04:43 +0200 |
commit | f6b7dc45acd690225b92ceed8dc688263cae8958 (patch) | |
tree | 90a851a56ade7cbc449f99c857402cb2f1a6ba6c /src/components/ContactDetails/ContactDetailsAvatar.vue | |
parent | 5c0dd7d7d6d0f6f461dd909d399e31f4cc662819 (diff) |
Fix avatar errors, and migrate settings menu to Actions
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'src/components/ContactDetails/ContactDetailsAvatar.vue')
-rw-r--r-- | src/components/ContactDetails/ContactDetailsAvatar.vue | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/components/ContactDetails/ContactDetailsAvatar.vue b/src/components/ContactDetails/ContactDetailsAvatar.vue index fb54cd89..cbccfdc9 100644 --- a/src/components/ContactDetails/ContactDetailsAvatar.vue +++ b/src/components/ContactDetails/ContactDetailsAvatar.vue @@ -108,8 +108,8 @@ export default { }, computed: { photo() { - const type = this.contact.vCard.getFirstProperty('photo').type - if (!this.contact.photo.startsWith('data') && type === 'binary') { + const photo = this.contact.vCard.getFirstProperty('photo') + if (photo && !this.contact.photo.startsWith('data') && photo.type === 'binary') { // split on coma in case of any leftover base64 data and retrieve last part // usually we come to this part when the base64 image type is unknown return `data:image;base64,${this.contact.photo.split(',').pop()}` @@ -242,7 +242,7 @@ export default { }, updateImgSize() { - if (this.contact.photo) { + if (this.contact.photo && this.$refs.img) { this.updateHeightWidth(this.$refs.img.naturalHeight, this.$refs.img.naturalWidth) } }, |