diff --git a/.swiftlint.yml b/.swiftlint.yml index 1f4ac21..245fc71 100644 --- a/.swiftlint.yml +++ b/.swiftlint.yml @@ -23,7 +23,7 @@ whitelist_rules: - conditional_returns_on_newline - contains_over_filter_count - contains_over_filter_is_empty -# - contains_over_first_not_nil + - contains_over_first_not_nil - control_statement # - convenience_type - custom_rules diff --git a/pass/Controllers/PasswordEditorTableViewController.swift b/pass/Controllers/PasswordEditorTableViewController.swift index 5803713..a726ca1 100644 --- a/pass/Controllers/PasswordEditorTableViewController.swift +++ b/pass/Controllers/PasswordEditorTableViewController.swift @@ -265,7 +265,7 @@ class PasswordEditorTableViewController: UITableViewController { // Remove delimiter configuration for XKCD style passwords. Re-add it for random ones. switch flavor { case .random: - guard tableData[1].first(where: isPasswordDelimiterCellData) == nil else { + if tableData[1].contains(where: isPasswordDelimiterCellData) { return } tableData[1].insert([.type: PasswordEditorCellType.passwordGroupsCell], at: tableData[1].endIndex)