Browse Source

Properly handle null avatar

Danilo Bargen 7 năm trước cách đây
mục cha
commit
6ca4ffe11e
1 tập tin đã thay đổi với 3 bổ sung1 xóa
  1. 3 1
      src/directives/avatar.ts

+ 3 - 1
src/directives/avatar.ts

@@ -46,7 +46,9 @@ export default [
 
                 this.avatarExists = () => {
                     if (this.receiver.avatar === undefined
-                        || this.receiver.avatar[this.resolution] === undefined) {
+                        || this.receiver.avatar === null
+                        || this.receiver.avatar[this.resolution] === undefined
+                        || this.receiver.avatar[this.resolution] === null) {
                         return false;
                     }
                     this.isLoading = false;