We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
path.getString()
1 parent d8dc402 commit cee8426Copy full SHA for cee8426
android/src/main/java/com/sourcetoad/reactnativesketchcanvas/RNTSketchCanvasManager.kt
@@ -133,9 +133,9 @@ class RNTSketchCanvasViewManager :
133
if (path != null) {
134
for (i in 0 until path.size()) {
135
val coor =
136
- path.getString(i).split(",".toRegex()).dropLastWhile { it.isEmpty() }
137
- .toTypedArray()
138
- if (pointPath != null) {
+ path.getString(i)?.split(",".toRegex())?.dropLastWhile { it.isEmpty() }
+ ?.toTypedArray()
+ if (coor != null && pointPath != null) {
139
pointPath.add(PointF(coor[0].toFloat(), coor[1].toFloat()))
140
}
141
0 commit comments