Permalink
Browse files

Minor update to prevent profile details call from erring out.

  • Loading branch information...
cebartling committed Apr 27, 2012
1 parent 1e2794e commit 44c9d1af16f5427d4c25c78a4d868afbe28f6d72
Showing with 5 additions and 3 deletions.
  1. +5 −3 backbone-photo-gallery/web-app/js/application/profile/index.js
@@ -70,9 +70,11 @@ var AppRouter = Backbone.Router.extend({
},
profileDetails:function (id) {
- this.profile = this.profileList.get(id);
- this.profileView = new ProfileView({model:this.profile});
- $('#profileDetailsContainer').html(this.profileView.render().el);
+ if (this.profileList !== undefined) {
+ this.profile = this.profileList.get(id);
+ this.profileView = new ProfileView({model:this.profile});
+ $('#profileDetailsContainer').html(this.profileView.render().el);
+ }
}
});

0 comments on commit 44c9d1a

Please sign in to comment.