Simplify the numberOfLocalCommits function
This commit is contained in:
parent
c5f95cfc8f
commit
1d07559393
1 changed files with 2 additions and 7 deletions
|
|
@ -801,15 +801,10 @@ public class PasswordStore {
|
|||
|
||||
public func numberOfLocalCommits() -> Int {
|
||||
do {
|
||||
if let localCommits = try getLocalCommits() {
|
||||
return localCommits.count
|
||||
} else {
|
||||
return 0
|
||||
}
|
||||
return try getLocalCommits()?.count ?? 0
|
||||
} catch {
|
||||
print(error)
|
||||
return 0
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
private func getLocalCommits() throws -> [GTCommit]? {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue