Skip to content
This repository was archived by the owner on Jun 15, 2025. It is now read-only.

Commit 3fab2f2

Browse files
authored
Merge pull request MessageKit#1812 from kkarakamis/main
duration NaN issue fix
2 parents eed0147 + d424112 commit 3fab2f2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/Protocols/MessagesDisplayDelegate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ extension MessagesDisplayDelegate {
385385
returnValue = String(format: "0:%.02d", Int(duration.rounded(.up)))
386386
} else if duration < 3600 {
387387
returnValue = String(format: "%.02d:%.02d", Int(duration / 60), Int(duration) % 60)
388-
} else {
388+
} else if duration.isFinite {
389389
let hours = Int(duration / 3600)
390390
let remainingMinutesInSeconds = Int(duration) - hours * 3600
391391
returnValue = String(

0 commit comments

Comments
 (0)