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

add jsutil.MaybeInt wrapper; apply it to IncomingProperties.Asn #120

Merged
merged 1 commit into from
Jul 30, 2024

Conversation

Skee
Copy link

@Skee Skee commented Jul 29, 2024

What

Adds a MaybeInt js.Value wrapper to jsutil.

Motivation

Cloudflare sometimes provides a cf object with no asn key. This causes cloudflare/fetch.NewIncomingProperties() to panic. This is described in #119.

This change adds a js.Value wrapper for ints which first verifies if the Value is undefined.

Copy link
Owner

@syumai syumai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@syumai syumai merged commit 50d520d into syumai:main Jul 30, 2024
2 checks passed
@syumai
Copy link
Owner

syumai commented Jul 30, 2024

@Skee I've released this patch as v0.26.2. Thank you for your contribution! 🎉
https://github.com/syumai/workers/releases/tag/v0.26.2

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.

2 participants