I am getting the following error in react 'Unhandled Rejection (TypeError): slots.every(...) is not a function' and I can't seem to solve it.
componentWillMount() {
axios.get(API_BASE + `api/retrieveSlots`).then(response => {
console.log("response via db: ", response.data);
this.handleDBReponse(response.data);
});
}
for (let day in schedule) {
let slots = schedule[day];
if (slots.length) slots.every(slot => slot === true)(schedule[day] = true)
}