You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
useStopwatch: onClick={reset} throws TypeError: getTime is not a function #142
Opened #147 with the docs-side fix (option 1 from your suggestion).
If you would prefer the implementation fix instead (guarding the offset with an instanceof Date check so a non-Date argument is ignored) I'm happy to put
that up as a separate PR with a test. That would keep the readme example valid
as originally written.
Activity
OFK0 commentedon Aug 30, 2026
#147
@amrlabib
Opened #147 with the docs-side fix (option 1 from your suggestion).
If you would prefer the implementation fix instead (guarding the offset with an
instanceof Datecheck so a non-Date argument is ignored) I'm happy to putthat up as a separate PR with a test. That would keep the readme example valid
as originally written.
amrlabib commentedon Sep 27, 2026
Yeah i would go with the correct implementation Date check in a very small PR fixing the main issue
OFK0 commentedon Sep 27, 2026
@amrlabib
I updated the PR. Now, checks the Date is correct to parse and use. Otherwise continue with zero.
Please check #147
amrlabib commentedon Oct 5, 2026
Fixed in v4.0.9