Skip to content

Commit

Permalink
fix overlooked issue caused by removing people variable > relates #8
Browse files Browse the repository at this point in the history
  • Loading branch information
VirtualDOMinic committed Sep 8, 2018
1 parent 176a9fc commit e29a66d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ function createStopwatchArea(ppl, time, pplArr) {
noticeArea.appendChild(areaIntro);

createTimerObjects(minsPerPerson, pplArr);
createPeoplesDivs();
createPeoplesDivs(ppl);
// then call a function to add event listener to stopwatch area
stopwatchAreaListener();
}
Expand Down Expand Up @@ -203,7 +203,7 @@ function createTimerObjects(timeMS, pplNames) {
}

// function to create divs for each person, eventually displaying time left, time taken and button to start/stop
function createPeoplesDivs() {
function createPeoplesDivs(people) {
console.log("Run: createPeopleDivs");
// could use forEach here but not sure about browser support
for (var i = 0; i < people; i++) {
Expand Down

0 comments on commit e29a66d

Please sign in to comment.