Skip to content

Commit

Permalink
Added null checks for doc links
Browse files Browse the repository at this point in the history
  • Loading branch information
Abhinav Rau committed Jul 17, 2024
1 parent 61254dd commit e2b6e04
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/velvet_runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,19 +195,19 @@ async function checkDocumentLinks(rowNum, result, link_1_Column, link_2_Column,
if (result.results[0].document.hasOwnProperty('structData')) {
link_1_Column.getRange().getCell(rowNum, 0).values = [[result.results[0].document.structData.title]];
p0_result = result.results[0].document.structData.title;
} else {
} else if (result.results[0].document.hasOwnProperty('derivedStructData')) {
link_1_Column.getRange().getCell(rowNum, 0).values = [[result.results[0].document.derivedStructData.link]];
p0_result = result.results[0].document.derivedStructData.link;
}
if (result.results[1].document.hasOwnProperty('structData')) {
link_2_Column.getRange().getCell(rowNum, 0).values = [[result.results[1].document.structData.title]];
} else {
} else if (result.results[1].document.hasOwnProperty('derivedStructData')) {
link_2_Column.getRange().getCell(rowNum, 0).values = [[result.results[1].document.derivedStructData.link]];
p2_result = result.results[1].document.derivedStructData.link;
}
if (result.results[2].document.hasOwnProperty('structData')) {
link_3_Column.getRange().getCell(rowNum, 0).values = [[result.results[2].document.structData.title]];
} else {
} else if (result.results[2].document.hasOwnProperty('derivedStructData')) {
link_3_Column.getRange().getCell(rowNum, 0).values = [[result.results[2].document.derivedStructData.link]];
}

Expand Down

0 comments on commit e2b6e04

Please sign in to comment.