Skip to content

Commit

Permalink
Merge pull request #1 from rohan-buchner/upstream_main
Browse files Browse the repository at this point in the history
Prevent script crash if no previous versions exist
  • Loading branch information
Rohan Büchner authored Sep 9, 2021
2 parents 9cc0f35 + 39b68e2 commit c4a2e09
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,11 @@ class Action {
res.on("data", chunk => body += chunk)
res.on("end", () => {
const existingVersions = JSON.parse(body)
const checkSum = existingVersions
.items
.every((node) => {
const checkSum = null
let prevVersions = existingVersions.items;

if(prevVersions)
prevVersions.every((node) => {
if (!node.items)
return true;
// this will quit the loop if true
Expand Down

0 comments on commit c4a2e09

Please sign in to comment.