File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ - (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result {
3939 result ([self getFormFieldValueForFieldWithFullyQualifiedName: fullyQualifiedName]);
4040 } else if ([@" applyInstantJson" isEqualToString: call.method]) {
4141 NSString *annotationsJson = call.arguments [@" annotationsJson" ];
42- if (annotationsJson == nil || annotationsJson .length < = 0 ) {
42+ if (annotationsJson.length = = 0 ) {
4343 result ([FlutterError errorWithCode: @" " message: @" annotationsJson may not be nil or empty." details: nil ]);
4444 return ;
4545 }
@@ -65,8 +65,8 @@ - (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result {
6565 NSError *error;
6666 NSData *data = [document generateInstantJSONFromDocumentProvider: document.documentProviders.firstObject error: &error];
6767 NSString *annotationsJson = [[NSString alloc ]initWithData:data encoding: NSUTF8StringEncoding];
68- if (annotationsJson == nil || annotationsJson. length <= 0 || error ) {
69- result ([FlutterError errorWithCode: @" " message: @" Error while exporting document Instant JSON." details: nil ]);
68+ if (annotationsJson == nil ) {
69+ result ([FlutterError errorWithCode: @" " message: @" Error while exporting document Instant JSON." details: error.localizedDescription ]);
7070 } else {
7171 result (annotationsJson);
7272 }
You can’t perform that action at this time.
0 commit comments