Kaynağa Gözat

Fix exception when trying to find a version of a doc that has no versions

Thibaut Courouble 9 yıl önce
ebeveyn
işleme
d7726f98b1
1 değiştirilmiş dosya ile 1 ekleme ve 0 silme
  1. 1 0
      lib/docs/core/doc.rb

+ 1 - 0
lib/docs/core/doc.rb

@@ -53,6 +53,7 @@ module Docs
       end
 
       def version_slug
+        return if version.blank?
         slug = version.downcase
         slug.gsub! '+', 'p'
         slug.gsub! '#', 's'