Fix crashing bug by not force-unwrapping.

This commit is contained in:
Brent Simmons committed 2025-11-29 10:04:39 -08:00
1 parent 4c032616c6
commit 3b7585f8e0
1 file changed
+6 -3
@@ -524,9 +524,12 @@ final class ReaderAPICaller: NSObject {
if self.variant == .theOldReader {
return "i=tag:google.com,2005:reader/item/\(articleID)"
} else {
let idValue = Int(articleID)!
let idHexString = String(idValue, radix: 16, uppercase: false)
return "i=tag:google.com,2005:reader/item/\(idHexString)"
if let idValue = Int(articleID) {
let idHexString = String(idValue, radix: 16, uppercase: false)
return "i=tag:google.com,2005:reader/item/\(idHexString)"
} else {
return "i=tag:google.com,2005:reader/item/\(articleID)"
}
}
}).joined(separator:"&")