From dcac17855ed8498cdfb325437c3da172325de45d Mon Sep 17 00:00:00 2001 From: David Morley Date: Sat, 18 Feb 2012 12:30:01 -0600 Subject: [PATCH] fix 2898 - public profile unauthed user --- public/javascripts/app/views/stream_view.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/public/javascripts/app/views/stream_view.js b/public/javascripts/app/views/stream_view.js index be37cd134..b360f95f9 100644 --- a/public/javascripts/app/views/stream_view.js +++ b/public/javascripts/app/views/stream_view.js @@ -18,9 +18,11 @@ app.views.Stream = Backbone.View.extend({ this.stream.bind("fetched", this.removeLoader, this) this.stream.bind("allPostsLoaded", this.unbindInfScroll, this) this.collection.bind("add", this.addPost, this); - app.user().bind("nsfwChanged", function() { - _.map(this.postViews, function(view){ view.render() }) - }, this) + if(window.app.user()) { + app.user().bind("nsfwChanged", function() { + _.map(this.postViews, function(view){ view.render() }) + }, this) + } }, addPost : function(post) {