Skip to content

fix: Correct fare calculation for invalid distance values (Fixes #2) - #25

Open
mandeep6207 wants to merge 1 commit into
Kush-012:mainfrom
mandeep6207:fix-fare-calculation
Open

fix: Correct fare calculation for invalid distance values (Fixes #2)#25
mandeep6207 wants to merge 1 commit into
Kush-012:mainfrom
mandeep6207:fix-fare-calculation

Conversation

@mandeep6207

Copy link
Copy Markdown
Contributor

Fixed fare calculation bug when distance is zero,
null, undefined, or invalid.

Changes:

  • Added distance validation
  • Prevented NaN fare values
  • Added fallback minimum fare logic

Fixes #2
Contribution under OSCG.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🚨 Fix incorrect fare calculation when distance is zero or undefined

1 participant