Remove unneeded code

remove unneeded code

irb(main):001:0> def test; if false; puts "hi"; end; end
=> :test
irb(main):002:0> test
=> nil

From 966d3c84379f5764d43f702bfb03d906137beb8b Mon Sep 17 00:00:00 2001
From: Sam <sam.saffron@gmail.com>
Date: Wed, 21 Nov 2018 12:57:09 +1100
Subject: [PATCH] remove unneeded code

irb(main):001:0> def test; if false; puts “hi”; end; end
=> :test
irb(main):002:0> test
=> nil


diff --git a/lib/topic_view.rb b/lib/topic_view.rb
index 8edfed9..21fbe75 100644
--- a/lib/topic_view.rb
+++ b/lib/topic_view.rb
@@ -484,8 +484,6 @@ class TopicView
   def current_post_number
     if highest_post_number.present?
       post_number > highest_post_number ? highest_post_number : post_number
-    else
-      nil
     end
   end

GitHub

1 Like