|
|
@@ -120,10 +120,9 @@ function getUser() { |
|
|
|
}).then(b => { |
|
|
|
const validTypes = ['image/jpeg', 'image/png'] |
|
|
|
|
|
|
|
if (!validTypes.includes(b.type) || b.size <= 1) { |
|
|
|
fetch("/assets/image/empty-avatar.jpg"). |
|
|
|
if (!b || !validTypes.includes(b.type) || b.size <= 1) { |
|
|
|
return fetch("/assets/image/empty-avatar.jpg"). |
|
|
|
then(r => r.blob()).then( a => this.user.avatar = a ) |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
this.user.avatar = b |
|
|
@@ -132,9 +131,8 @@ function getUser() { |
|
|
|
const validTypes = ['image/jpeg', 'image/png'] |
|
|
|
|
|
|
|
if (!validTypes.includes(b.type) || b.size <= 1) { |
|
|
|
fetch("/assets/image/empty-letterhead.jpg"). |
|
|
|
return fetch("/assets/image/empty-letterhead.jpg"). |
|
|
|
then(r => r.blob()).then( a => this.user.letterhead = a ) |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
this.user.letterhead = b |
|
|
|