Commit 1f4ee55

mokha <mokha@cisco.com>
2018-03-21 01:42:00
fix bug when not animating.
1 parent a67f09c
Changed files (1)
lib
lib/xsay/render.rb
@@ -22,8 +22,9 @@ module Xsay
     end
 
     def each_frame
+      return yield 0 unless move?
       frames = distance.downto(0).to_a + 0.upto(distance).to_a
-      frames.uniq.each { |x| yield x }
+      frames.each { |x| yield x }
     end
 
     private