Skip to content

Commit 6d27c8d

Browse files
graycreateclaude
andcommitted
fix: prevent crash when filter menu content is empty
- Changed OR (||) to AND (&&) in FeedInfo.isValid() - Prevents index out of range crash when items array is empty - Fixes crash reported in TestFlight feedback Crash details: - Swift runtime failure: Index out of range - Location: FeedInfo.isValid() accessing items[0] on empty array - Trigger: Filter menu with no corresponding content 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 5e6ec2f commit 6d27c8d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

V2er/State/DataFlow/Model/FeedInfo.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ struct FeedInfo: BaseModel {
2525
if twoStepStr.notEmpty() && twoStepStr.contains("两步验证") {
2626
return false
2727
}
28-
return items.count > 0 || items[0].userName.notEmpty
28+
return items.count > 0 && items[0].userName.notEmpty
2929
}
3030

3131
mutating func append(feedInfo: FeedInfo) {

0 commit comments

Comments
 (0)