Skip to content

Commit

Permalink
fix: iterate through json responses
Browse files Browse the repository at this point in the history
  • Loading branch information
Chickensoupwithrice committed Aug 31, 2023
1 parent 5999b8a commit ffd459a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions crawler.js
Original file line number Diff line number Diff line change
Expand Up @@ -435,9 +435,11 @@ self.__bx_behaviors.selectMainBehavior();
const resp = await fetch("http://localhost:9221/json");
if (resp.status === 200) {
const browserJson = await resp.json();
if (browserJson.id === page.target()._titleId) {
return browserJson[0].faviconUrl;
}
for (const jsons of browserJson) {

Check failure on line 438 in crawler.js

View workflow job for this annotation

GitHub Actions / lint (18.x)

Expected indentation of 6 spaces but found 3 tabs
if (jsons.id === page.target()._targetId) {

Check failure on line 439 in crawler.js

View workflow job for this annotation

GitHub Actions / lint (18.x)

Expected indentation of 8 spaces but found 4 tabs
return jsons.faviconUrl;

Check failure on line 440 in crawler.js

View workflow job for this annotation

GitHub Actions / lint (18.x)

Expected indentation of 10 spaces but found 5 tabs
}

Check failure on line 441 in crawler.js

View workflow job for this annotation

GitHub Actions / lint (18.x)

Expected indentation of 8 spaces but found 4 tabs
}

Check failure on line 442 in crawler.js

View workflow job for this annotation

GitHub Actions / lint (18.x)

Expected indentation of 6 spaces but found 3 tabs
}
logger.error("Localhost debugger failed with status", resp.status);
}
Expand Down

0 comments on commit ffd459a

Please sign in to comment.