freeCodeCamp / pantry-for-good

An open source food bank logistics and inventory management tool
Other
395 stars 189 forks source link

Include setWaypoints reducer in CustomerSelector #390

Closed ehoops-zz closed 6 years ago

ehoops-zz commented 6 years ago

For deselect all customers on route assignment page.

Previously, clicking deselect all would give a console error: vendor.js:1 Uncaught TypeError: t.setWaypoints is not a function at handleDeselectAll (app.js:1) at Object.executeOnChange (vendor.js:1) at Q. (vendor.js:1) at Object.o (vendor.js:1) at s (vendor.js:1) at Object.executeDispatchesInOrder (vendor.js:1) at p (vendor.js:1) at d (vendor.js:1) at Array.forEach () at e.exports (vendor.js:1)

setWaypoints was already defined in the redux file. This PR includes the setWaypoints reducer in CustomerSelector and adds it to dispatchProps.

kenjiO commented 6 years ago

Wonderful! Thanks for finding this and fixing it.