Skip to content

Commit

Permalink
Check if the blobKey is set. Print a message to the user otherwise
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickAnyline committed Nov 22, 2022
1 parent 2f9d69d commit 1f2fbbd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion example/RNExampleApp/src/Result.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,11 @@ export default function Result({
}

let onReportCorrectedResultPressed = function() {
if(correctedResult !== "") {
let blobKey = result["blobKey"];

if(typeof blobKey === 'undefined' || blobKey === '' || blobKey === null){
setResponseText("Only licenses with 'debugReporting' set to 'on' allow user corrected results.");
} else if(correctedResult !== "") {
setResponseText("Waiting for response...");
AnylineOCR.reportCorrectedResult(result["blobKey"], correctedResult, onReportCorrectedResultResponseHandler);
}
Expand Down

0 comments on commit 1f2fbbd

Please sign in to comment.