Explorar el Código

Properly handle null avatar

Danilo Bargen hace 7 años
padre
commit
6ca4ffe11e
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  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;