Skip to content

Commit

Permalink
fix crash when sorting declarations with no USR
Browse files Browse the repository at this point in the history
since usr isn't present in all declarations, we need to fall back on
something.

fixes #661.
  • Loading branch information
jpsim committed Nov 26, 2016
1 parent 2528039 commit 8573504
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/jazzy/doc_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def self.prepare_output_dir(output_dir, clean)
def self.doc_structure_for_docs(docs)
docs.map do |doc|
children = doc.children
.sort_by { |c| [c.nav_order, c.name, c.usr] }
.sort_by { |c| [c.nav_order, c.name, c.usr || ''] }
.flat_map do |child|
# FIXME: include arbitrarily nested extensible types
[{ name: child.name, url: child.url }] +
Expand Down

0 comments on commit 8573504

Please sign in to comment.