Skip to content

Commit 992fef8

Browse files
committed
Fix: NoMethodError: undefined method `following_users' for nil:NilClass
1 parent 6bc9423 commit 992fef8

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

app/views/layouts/protip.html.haml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,10 @@
2828
%canvas.blur{ src: image_path(users_background_image) }
2929
= yield
3030

31-
#x-following-users.hide{'data-users' => current_user.following_users.map(&:username)}
32-
#x-following-networks.hide{'data-networks' => current_user.following_networks.map(&:slug)}
33-
#x-following-teams.hide{'data-teams' => current_user.teams_being_followed.map(&:name)}
31+
- if current_user
32+
#x-following-users.hide{'data-users' => current_user.following_users.map(&:username)}
33+
#x-following-networks.hide{'data-networks' => current_user.following_networks.map(&:slug)}
34+
#x-following-teams.hide{'data-teams' => current_user.teams_being_followed.map(&:name)}
3435

3536
- unless is_admin?
3637
:javascript

0 commit comments

Comments
 (0)