Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Cannot read properties of null when backspace on hour field #767

Closed
gffuma opened this issue Sep 14, 2023 · 1 comment · Fixed by #768
Closed

Bug: Cannot read properties of null when backspace on hour field #767

gffuma opened this issue Sep 14, 2023 · 1 comment · Fixed by #768
Labels
bug Something isn't working

Comments

@gffuma
Copy link

gffuma commented Sep 14, 2023

Description of the bug

https://github.com/buildo/bento-design-system/blob/40280a12a040eded481e78fa7154d2178bf6bdd5/packages/bento-design-system/src/TimeField/TimeField.tsx#L30C1-L30C1

I think that value can also be null.

 const onChange = (value: TimeValue) => {
    const time = new Time(value.hour, value.minute, value.second, value.millisecond);
    return props.onChange(time);
  };

Playroom reproduction

Easy to reproduce go here:

https://developer.bento-ds.com/Components/TimeField/

Press backspace into the hour field got runtime error.

Version

v0.20.2

What browsers are you seeing the problem on?

No response

@gabro
Copy link
Member

gabro commented Sep 14, 2023

Thanks for reporting! A fix is coming in #768

@github-project-automation github-project-automation bot moved this to Done in Bento Sep 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants