Skip to content

Commit

Permalink
Merge pull request #686 from realm/jp-sort-optional-usr
Browse files Browse the repository at this point in the history
fix crash when sorting declarations with no USR
  • Loading branch information
jpsim authored Nov 26, 2016
2 parents 2528039 + b634321 commit 7e752d1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## Master

##### Breaking

* None.

##### Enhancements

* Podspec-based documentation will take trunk's `pushed_with_swift_version`
Expand All @@ -18,6 +22,12 @@
* Rename Dash typedef type from "Alias" to "Type".
[Bogdan Popescu](https://github.com/Kapeli)

* Fix crash when sorting multiple identically named declarations with no USR,
which is very common when generating docs for podspecs supporting multiple
platforms.
[JP Simard](https://github.com/jpsim)
[#661](https://github.com/realm/jazzy/issues/661)

## 0.7.2

##### Breaking
Expand Down
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 7e752d1

Please sign in to comment.