mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 00:38:00 +08:00
FIX: Remove return statement from inside block
This commit is contained in:
parent
aeaf6b5a7c
commit
6f5b8f61df
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user