mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 02:53:10 +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)
|
def topic_view_post_custom_fields_whitelister(&block)
|
||||||
reloadable_patch do |plugin|
|
reloadable_patch do |plugin|
|
||||||
::TopicView.add_post_custom_fields_whitelister do |user|
|
::TopicView.add_post_custom_fields_whitelister do |user|
|
||||||
return [] unless plugin.enabled?
|
plugin.enabled? ? block.call(user) : []
|
||||||
block.call(user)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user