Skip to content

Commit

Permalink
Fix brave/brave-ios#8694: Potential tab loss when window not found (b…
Browse files Browse the repository at this point in the history
…rave/brave-ios#8695)

Pass WindowID as a UUID directly to NSPredicate
  • Loading branch information
Brandon-T authored Jan 30, 2024
1 parent b0ca0ad commit beedeca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/Data/models/SessionWindow.swift
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ extension SessionWindow {
}

public static func from(windowId: UUID, in context: NSManagedObjectContext) -> SessionWindow? {
let predicate = NSPredicate(format: "\(#keyPath(SessionWindow.windowId)) == %@", windowId.uuidString)
let predicate = NSPredicate(format: "\(#keyPath(SessionWindow.windowId)) == %@", windowId as NSUUID)
return first(where: predicate, context: context)
}

Expand Down

0 comments on commit beedeca

Please sign in to comment.