diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-02-09 12:04:44 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-02-09 12:04:44 +0000 |
commit | ff46e9d0a437d95550887b9d13a22306163b99f9 (patch) | |
tree | 71626290428a1a7e47d1a147b3dbeec2db4d97e0 /app/helpers/watchers_helper.rb | |
parent | 79d01c7fe57db729cb1a592c7b796ae71503c026 (diff) | |
download | redmine-ff46e9d0a437d95550887b9d13a22306163b99f9.tar.gz redmine-ff46e9d0a437d95550887b9d13a22306163b99f9.zip |
Makes #watcher_link return an empty string when given nil.
git-svn-id: http://svn.redmine.org/redmine/trunk@12869 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers/watchers_helper.rb')
-rw-r--r-- | app/helpers/watchers_helper.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/helpers/watchers_helper.rb b/app/helpers/watchers_helper.rb index f1cc0702d..28f912bbc 100644 --- a/app/helpers/watchers_helper.rb +++ b/app/helpers/watchers_helper.rb @@ -27,6 +27,7 @@ module WatchersHelper def watcher_link(objects, user) return '' unless user && user.logged? objects = Array.wrap(objects) + return '' unless objects.any? watched = Watcher.any_watched?(objects, user) css = [watcher_css(objects), watched ? 'icon icon-fav' : 'icon icon-fav-off'].join(' ') |