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

Fix error in isRFC3339_ISO6801 #32

Closed
wants to merge 1 commit into from

Conversation

ricochet1k
Copy link

Fixes TypeError: str.substring is not a function when large integers are returned from queries.

Fixes `TypeError: str.substring is not a function` when large integers are returned from queries.
@retzkek
Copy link
Contributor

retzkek commented Oct 27, 2020

Thanks for the patch, how big of an integer are we talking about? I wasn't able to reproduce it, even with MAX_SAFE_INTEGER. Could you add a test case (in util.test.ts) to reproduce it?

That said, we probably should have isRFC3339_ISO6801() only take string arguments since anything else doesn't make sense. On the caller side we could just wrap the argument with String() to be lazy, or do some more involved type-checking.

@carvid
Copy link
Contributor

carvid commented Oct 31, 2020

We hit that error today. It fails even with small integers (e.g. 1288310).

@retzkek
Copy link
Contributor

retzkek commented Nov 3, 2020

Replaced by #33

@retzkek retzkek closed this Nov 3, 2020
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.

3 participants