mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 16:21:18 +08:00
Support Ruby 2.4.
This commit is contained in:
@ -45,7 +45,7 @@ module PrettyText
|
||||
end
|
||||
|
||||
def get_topic_info(topic_id)
|
||||
return unless Fixnum === topic_id
|
||||
return unless topic_id.is_a?(Integer)
|
||||
# TODO this only handles public topics, secured one do not get this
|
||||
topic = Topic.find_by(id: topic_id)
|
||||
if topic && Guardian.new.can_see?(topic)
|
||||
@ -76,4 +76,3 @@ module PrettyText
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user