jonmbake / react-terminal-ui

A terminal react component with support for light and dark modes.
https://jonmbake.github.io/react-terminal-ui/demo/
MIT License
214 stars 33 forks source link

onInput prompt can be 0 #47

Closed romulorod closed 10 months ago

romulorod commented 10 months ago

Describe the bug When using the component, the onInput can be set to 0 from the client usage, even though it errors saying that it should be a callback function, its possible to, at least in dev mode, display the 0 in terminal as visible in the attached screenshot.

To Reproduce pass 0 to onInput prop when rendering

Expected behavior The short-circuit verification on the lib should check if onInput is indeed a function to prevent this from happening.

Screenshots image

Additional context Add any other context about the problem here.

github-actions[bot] commented 10 months ago

Thank you for taking the time to submit an Issue! You should get a response to this issue within one to two days.