Skip to content

Commit

Permalink
fix-loop-when-error (#225)
Browse files Browse the repository at this point in the history
  • Loading branch information
hajonsoft authored Apr 29, 2024
1 parent 57a9b75 commit 8638bbc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hajonsoft-eagle",
"version": "2.6.36",
"version": "2.6.37",
"description": "HAJonSoft node app to submit passengers to visa systems",
"main": "index.js",
"scripts": {
Expand Down
4 changes: 3 additions & 1 deletion src/ehj.js
Original file line number Diff line number Diff line change
Expand Up @@ -898,7 +898,9 @@ async function pageContentHandler(currentConfig) {
// try again once using generated MRZ, do not log error unless it is the second time around
if (sent[passenger.passportNumber] === undefined) {
sent[passenger.passportNumber] = 1;
fs.writeFileSync(getPath("loop.txt"), "ehaj", "utf-8");
if (fs.existsSync(getPath("loop.txt"))) {
fs.writeFileSync(getPath("loop.txt"), "", "utf-8");
}
await page.reload();
return;
}
Expand Down

0 comments on commit 8638bbc

Please sign in to comment.