From ffbadb220fd9cdabbd03182a0f532cb3eeaafeb1 Mon Sep 17 00:00:00 2001 From: Christoph Haas Date: Sun, 2 Apr 2017 17:53:21 +0200 Subject: [PATCH] Avoid error if nobody is logged in --- app/views/layouts/_topbar.slim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/layouts/_topbar.slim b/app/views/layouts/_topbar.slim index 3b79c6f..ba559ec 100644 --- a/app/views/layouts/_topbar.slim +++ b/app/views/layouts/_topbar.slim @@ -26,7 +26,7 @@ nav.top-bar li class=('active' if controller_name=='welcome' and action_name=='about') a href="/about" About // Add link if user has uploaded screenshots - - if @current_users_screenshots.any? + - if @current_users_screenshots and @current_users_screenshots.any? li class=('active' if controller_name=='packages' and action_name=='my_uploads') = link_to my_uploads_path ' My uploads