diff --git a/WordPress/Classes/ViewRelated/Post/AbstractPostListViewController.swift b/WordPress/Classes/ViewRelated/Post/AbstractPostListViewController.swift index aaa942a40f23..17dd6717a655 100644 --- a/WordPress/Classes/ViewRelated/Post/AbstractPostListViewController.swift +++ b/WordPress/Classes/ViewRelated/Post/AbstractPostListViewController.swift @@ -758,7 +758,9 @@ class AbstractPostListViewController: UIViewController, SiteStatsInformation.sharedInstance.oauth2Token = blog.authToken SiteStatsInformation.sharedInstance.siteID = blog.dotComID - let postURL = URL(string: post.permaLink! as String) + guard let postURL = post.permaLink.flatMap(URL.init) else { + return wpAssertionFailure("permalink missing or invalid") + } let postStatsTableViewController = PostStatsTableViewController.withJPBannerForBlog(postID: postID, postTitle: post.titleForDisplay(), postURL: postURL)