Skip to content

Commit

Permalink
Better handling GV failure
Browse files Browse the repository at this point in the history
  • Loading branch information
rrgeorge committed Sep 15, 2021
1 parent 6adbc83 commit 4c35ffd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions ddb.js
Original file line number Diff line number Diff line change
Expand Up @@ -1799,8 +1799,8 @@ function displayModal(path,id) {
let tasks = []
const headings = dom.window.document.querySelectorAll("h1, h2, h3, h4, h5, h6")
prog.detail = `Found Map - ${mapTitle} - Scanning for markers with Google Vision`
const ocrResult = await this.gVisionClient.textDetection(dmMapImg).catch(e=>console.log(`Error submitting ${dmMap} (${typeof(dmMap)}) to Google Vision: ${e}`))
ocrResult[0]?.textAnnotations?.forEach((word,i)=>{
const [ocrResult] = await this.gVisionClient.textDetection(dmMapImg).catch(e=>console.log(`Error submitting ${dmMap} (${typeof(dmMap)}) to Google Vision: ${e}`))
ocrResult?.textAnnotations?.forEach((word,i)=>{
let txt = word.description.replaceAll(/[\W_]+/g,'').trim();
let box = word.boundingPoly.vertices
let x = box[0].x, y = box[0].y
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "encounterlog",
"productName": "EncounterLog",
"version": "2.1.6",
"version": "2.1.7",
"description": "Connect D&D Beyond to EncounterPlus",
"repository": {
"type": "git",
Expand Down

0 comments on commit 4c35ffd

Please sign in to comment.