Skip to content

Commit 05d45bc

Browse files
committed
fix: use isEmpty instead of count > 0 in history clear
Fixes empty_count SwiftLint violation.
1 parent 4b2a39a commit 05d45bc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

TablePro/Views/History/HistoryListViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ final class HistoryListViewController: NSViewController, NSMenuItemValidation {
362362
let count = dataProvider.count
363363
let itemName = count == 1 ? "history entry" : "history entries"
364364

365-
guard count > 0 else { return }
365+
guard !dataProvider.isEmpty else { return }
366366

367367
Task { @MainActor in
368368
let confirmed = await AlertHelper.confirmDestructive(

0 commit comments

Comments
 (0)