Skip to content

Commit

Permalink
Merge pull request #19418 from wordpress-mobile/fix/19413-crash-on-ta…
Browse files Browse the repository at this point in the history
…pping-account-settings-menu-for-accounts-with-no-sites

Fix crash on tapping Account Settings menu for accounts with no sites
  • Loading branch information
crazytonyli authored Oct 9, 2022
2 parents 41e9919 + d1b46eb commit 838058f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -396,4 +396,4 @@ DEPENDENCIES
xcpretty-travis-formatter

BUNDLED WITH
2.3.22
2.3.23
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ private class AccountSettingsController: SettingsController {
// If the primary site has no Site Title, then show the displayURL.
if primarySiteName.isEmpty {
let account = try? WPAccount.lookupDefaultWordPressComAccount(in: ContextManager.sharedInstance().mainContext)
primarySiteName = account?.defaultBlog.displayURL as String? ?? ""
primarySiteName = account?.defaultBlog?.displayURL as String? ?? ""
}

let primarySite = EditableTextRow(
Expand Down

0 comments on commit 838058f

Please sign in to comment.