Skip to content

Commit

Permalink
Add unchecked to pattern match in facia.scala
Browse files Browse the repository at this point in the history
Co-authored-by: Roberto Tyley <roberto.tyley@guardian.co.uk>
  • Loading branch information
ioannakok and rtyley committed Aug 2, 2022
1 parent b429232 commit 4bddfbb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common/app/model/facia.scala
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ object SeoData extends GuLogging {
val editions = Edition.all.map(_.id.toLowerCase)

def fromPath(path: String): SeoData =
path.split('/').toList match {
(path.split('/').toList: @unchecked) match { // split() never gives the empty list
//This case is only to handle the nonevent of uk/technology/games
case edition :: section :: name :: tail if editions.contains(edition.toLowerCase) =>
val webTitle: String = webTitleFromTail(name :: tail)
Expand Down

0 comments on commit 4bddfbb

Please sign in to comment.