Skip to content

Commit c672240

Browse files
committed
fix: double support for duration
1 parent 3d18e0c commit c672240

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

android/src/main/java/com/ting/TingModule.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ class TingModule internal constructor(context: ReactApplicationContext) : TingSp
162162
}
163163

164164
private fun getDuration(options: ReadableMap): Int {
165-
return if (options.hasKey("duration")) (options.getInt("duration") * 1000) else 3000
165+
return if (options.hasKey("duration")) (options.getDouble("duration") * 1000).toInt() else 3000
166166
}
167167

168168
private fun getContainerView(

0 commit comments

Comments
 (0)