Skip to content

Commit

Permalink
Fix what bd3a2bc should had been fixed.
Browse files Browse the repository at this point in the history
  • Loading branch information
hugopl committed Aug 3, 2023
1 parent cc8765d commit e0ebfe3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/doc_set.cr
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,12 @@ class DocSet
delegate id, to: @metadata

def self.default_id : String
"Crystal-#{Crystal::VERSION}r0"
@@default_id ||= begin
docsets = available_docsets
return "Crystal-#{Crystal::VERSION}r0" if docsets["Crystal-#{Crystal::VERSION}r0"]?

available_docsets.first_key? || "NO DOCSET FOUND" # a better crypt error
end
end

def self.available_docsets : Hash(String, DocSetMetadata)
Expand Down

0 comments on commit e0ebfe3

Please sign in to comment.