Skip to content

Commit

Permalink
For each
Browse files Browse the repository at this point in the history
  • Loading branch information
nids98 committed Feb 5, 2019
1 parent b5478ab commit 3217a68
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Services/firebaseDBService.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ function unblockRooms (event, eventrooms) {
let roomRef = firebaseDB.ref('/roomsx/')
roomRef.on('value', function (snapshot) {
let allDates = snapshot.val()
for (let date in allDates) {
allDates.forEach((date) => {
if (moment(date, 'DD-MM-YYYY').isBetween(moment(event.startDate, 'DD-MM-YYYY'), moment(event.endDate, 'DD-MM-YYYY'), null, '[]')) {
let dateRef = roomRef.child(date)
dateRef.on('value', function (snapshot) {
Expand All @@ -234,7 +234,7 @@ function unblockRooms (event, eventrooms) {
}
})
}
}
})
})
}

Expand Down

0 comments on commit 3217a68

Please sign in to comment.