Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Commit

Permalink
Fix #8694: Potential tab loss when window not found (#8695)
Browse files Browse the repository at this point in the history
Pass WindowID as a UUID directly to NSPredicate
  • Loading branch information
Brandon-T authored and iccub committed Jan 30, 2024
1 parent cfd9cfe commit b4437e3
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 b4437e3

Please sign in to comment.