Skip to content

fix: convert dataset values to numbers in async typer#267

Open
Vedant43hh wants to merge 1 commit into
wesbos:masterfrom
Vedant43hh:fix-async-typer-string-params
Open

fix: convert dataset values to numbers in async typer#267
Vedant43hh wants to merge 1 commit into
wesbos:masterfrom
Vedant43hh:fix-async-typer-string-params

Conversation

@Vedant43hh

Copy link
Copy Markdown

Summary

Fixes the Async Typer issue where getRandomBetween() receives string values from el.dataset.

Changes Made

  • Converted typeMin and typeMax from strings to numbers using parseInt.
  • Ensured getRandomBetween() always receives numeric arguments.

Why

Dataset values are always returned as strings. Passing them directly can lead to unexpected behavior and type-related bugs.

Fixes #230

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.

Async Typer UI - getRandomBetween() not behaving as expected because it's being called with strings

2 participants