Skip to content

Commit ec0b800

Browse files
author
Maika Akedo
committed
duration convert Int value easy to understand
1 parent 454bf67 commit ec0b800

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

StudyplusSDK/Studyplus.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ final public class Studyplus {
152152
/// - failure: callback when failure to post the studyRecord
153153
public func post(studyRecord: StudyplusRecord, success: @escaping () -> Void, failure: @escaping (_ error: StudyplusError) -> Void) {
154154

155-
guard StudyplusRecord.durationRange ~= Int(studyRecord.duration) else {
155+
guard StudyplusRecord.durationRange ~= Int(floor(studyRecord.duration)) else {
156156
failure(.postRecordFailed)
157157
return
158158
}

0 commit comments

Comments
 (0)