소스 검색

Properly handle null avatar

Danilo Bargen 7 년 전
부모
커밋
6ca4ffe11e
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  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;