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 :
133133 if (path != null ) {
134134 for (i in 0 until path.size()) {
135135 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 ) {
139139 pointPath.add(PointF (coor[0 ].toFloat(), coor[1 ].toFloat()))
140140 }
141141 }
Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ -(void)prepareForRecycle {
7373
7474- (NSDictionary *)RNTSketchCanvasTextStructToDict : (const RNTSketchCanvasTextStruct&)txt {
7575 return @{
76- @" text" : RCTNSStringFromString (toString ( txt.text ) ),
76+ @" text" : RCTNSStringFromString (txt.text ),
7777 @" font" : RCTNSStringFromString (txt.font ),
7878 @" fontSize" : @(txt.fontSize ),
7979 @" fontColor" : @(txt.fontColor ),
You can’t perform that action at this time.
0 commit comments