File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
android/src/main/java/com/sourcetoad/reactnativesketchcanvas Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -133,9 +133,9 @@ class RNTSketchCanvasViewManager :
133
133
if (path != null ) {
134
134
for (i in 0 until path.size()) {
135
135
val coor =
136
- path.getString(i).split(" ," .toRegex()).dropLastWhile { it.isEmpty() }
137
- .toTypedArray()
138
- if (pointPath != null ) {
136
+ path.getString(i)? .split(" ," .toRegex())? .dropLastWhile { it.isEmpty() }
137
+ ? .toTypedArray()
138
+ if (coor != null && pointPath != null ) {
139
139
pointPath.add(PointF (coor[0 ].toFloat(), coor[1 ].toFloat()))
140
140
}
141
141
}
Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ -(void)prepareForRecycle {
73
73
74
74
- (NSDictionary *)RNTSketchCanvasTextStructToDict : (const RNTSketchCanvasTextStruct&)txt {
75
75
return @{
76
- @" text" : RCTNSStringFromString (toString ( txt.text ) ),
76
+ @" text" : RCTNSStringFromString (txt.text ),
77
77
@" font" : RCTNSStringFromString (txt.font ),
78
78
@" fontSize" : @(txt.fontSize ),
79
79
@" fontColor" : @(txt.fontColor ),
You can’t perform that action at this time.
0 commit comments