Skip to content

Commit

Permalink
Assert number of processed components matches attributed strings
Browse files Browse the repository at this point in the history
  • Loading branch information
frederoni committed Mar 13, 2018
1 parent 62cd6f2 commit a8d8faf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions MapboxNavigation/InstructionPresenter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ class InstructionPresenter {
strings.append(NSAttributedString(string: (joinChar + text), attributes: attributesForLabel(label)))
}
}

assert(processedComponents.count == strings.count, "The number of processed components must match the number of attributed strings")

return (components: processedComponents, attributedStrings: strings)
}
Expand Down

0 comments on commit a8d8faf

Please sign in to comment.