FIX: Remove return statement from inside block

This commit is contained in:
David Taylor 2018-07-26 15:52:39 +01:00
parent aeaf6b5a7c
commit 6f5b8f61df
1 changed files with 1 additions and 2 deletions

View File

@ -178,8 +178,7 @@ class Plugin::Instance
def topic_view_post_custom_fields_whitelister(&block)
reloadable_patch do |plugin|
::TopicView.add_post_custom_fields_whitelister do |user|
return [] unless plugin.enabled?
block.call(user)
plugin.enabled? ? block.call(user) : []
end
end
end