@onekeyfe/react-native-skeleton 3.0.101 → 3.0.102

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -103,7 +103,11 @@ public class OneKeySkeletonRenderer(
103
103
  ?: ONEKEY_SKELETON_DEFAULT_COLORS.copyOf()
104
104
  val colorsChanged = !this.colors.contentEquals(nextColors)
105
105
  this.colors = nextColors
106
- durationNanos = ((durationSeconds ?: 3.0).coerceAtLeast(0.1) * 1_000_000_000L).toLong()
106
+ val normalizedDuration = (durationSeconds ?: 3.0)
107
+ .takeIf { it.isFinite() }
108
+ ?.coerceAtLeast(0.1)
109
+ ?: 3.0
110
+ durationNanos = (normalizedDuration * 1_000_000_000L).toLong()
107
111
  if (colorsChanged) invalidateShader()
108
112
  }
109
113
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onekeyfe/react-native-skeleton",
3
- "version": "3.0.101",
3
+ "version": "3.0.102",
4
4
  "description": "react-native-skeleton",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",