Skip to content

Commit fef275f

Browse files
committed
docs(form): add code comments to add clarity
1 parent 2dfb1dd commit fef275f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/actions/form.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,12 @@ export function formChanged () {
4646
dispatch(changingForm())
4747
const otpState = getState().otp
4848
const {autoPlan, debouncePlanTimeMs} = otpState.config
49+
50+
// check if a trip plan should be made
4951
if (autoPlan && queryIsValid(otpState)) {
52+
// trip plan should be made
53+
54+
// check if debouncing function needs to be (re)created
5055
if (!debouncedPlanTrip || lastDebouncePlanTimeMs !== debouncePlanTimeMs) {
5156
debouncedPlanTrip = debounce(() => dispatch(planTrip()), debouncePlanTimeMs)
5257
lastDebouncePlanTimeMs = debouncePlanTimeMs

0 commit comments

Comments
 (0)