Skip to content

Commit

Permalink
fix(users): Default user image was causing browser errors
Browse files Browse the repository at this point in the history
Even though thoroughly warned by angular docs, it seems we put an
angular expression inside the img[src] attribute. In scenarios where
angular loading is slow the browser tries to load an image at the URL
"{{::defaultUserImage}}" which obviously does not exist and causes an
error.
  • Loading branch information
atruskie committed Feb 10, 2017
1 parent a9fa742 commit e25f96e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/app/login/widget/loginWidget.tpl.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
class="loginWidgetLink"
target="_self">
<span class="">{{profile.userName}}</span>
<img src="{{::defaultUserImage}}"
ng-src="{{profile.imageUrls.tiny.url}}"
<img ng-src="{{profile.imageUrls.tiny.url || defaultUserImage}}"
class="loginWidgetImage">
</a>
<a ng-hide="loggedIn"
Expand Down

0 comments on commit e25f96e

Please sign in to comment.