Skip to content

Commit

Permalink
Added "results" parameter to "accumulateAvailabilityForMonth()"
Browse files Browse the repository at this point in the history
Refactoring the nested functions (moving out of "ScrapeWebsiteData()") requires adding the "private" results parameter to the moved function.
  • Loading branch information
pfurbacher committed Mar 9, 2021
1 parent d4f9239 commit 357c504
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions site-scrapers/TrinityEMS/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ async function ScrapeWebsiteData(browser, site) {
page
);

accumulateAvailabilityForMonth(dailySlotsForMonth);
accumulateAvailabilityForMonth(results, dailySlotsForMonth);
}

return results;
Expand Down Expand Up @@ -196,7 +196,7 @@ async function advanceMonth(page) {
*
* @param {availability Object} dailySlotsForMonth -- a month's collection of availability by date
*/
function accumulateAvailabilityForMonth(dailySlotsForMonth) {
function accumulateAvailabilityForMonth(results, dailySlotsForMonth) {
if (
dailySlotsForMonth == null ||
Object.keys(dailySlotsForMonth).length == 0
Expand Down

0 comments on commit 357c504

Please sign in to comment.