Sfoglia il codice sorgente

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

Thibaut Courouble 9 anni fa
parent
commit
d7726f98b1
1 ha cambiato i file con 1 aggiunte e 0 eliminazioni
  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'