diff options
author | Harald Eilertsen <haraldei@anduin.net> | 2017-12-30 15:31:55 +0100 |
---|---|---|
committer | Harald Eilertsen <haraldei@anduin.net> | 2017-12-30 15:31:55 +0100 |
commit | 1e7370fc998c64c42606b676c7003dd4bd82436b (patch) | |
tree | d94710e316e260d61ad228b388934ce50e2e700f /app | |
parent | 25ae20f29cc452dcd412dda50a0421745675e094 (diff) | |
download | hmnoweb-1e7370fc998c64c42606b676c7003dd4bd82436b.tar.gz hmnoweb-1e7370fc998c64c42606b676c7003dd4bd82436b.tar.bz2 hmnoweb-1e7370fc998c64c42606b676c7003dd4bd82436b.zip |
Make the sidebar processing more robust when there's nothing to show.
Diffstat (limited to 'app')
-rw-r--r-- | app/helpers/sidebar_helper.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/helpers/sidebar_helper.rb b/app/helpers/sidebar_helper.rb index e8e076a..97bb560 100644 --- a/app/helpers/sidebar_helper.rb +++ b/app/helpers/sidebar_helper.rb @@ -15,6 +15,6 @@ module SidebarHelper def page_has_side_body?(page) part = page.part_with_title("Side Body") - return part.present? && !part.body.empty? + return part.present? && !part.try(:body).try(:empty?) end end |