Closed Skee closed 2 months ago
Adds a MaybeInt js.Value wrapper to jsutil.
Cloudflare sometimes provides a cf object with no asn key. This causes cloudflare/fetch.NewIncomingProperties() to panic. This is described in #119.
cf
asn
This change adds a js.Value wrapper for ints which first verifies if the Value is undefined.
@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
What
Adds a MaybeInt js.Value wrapper to jsutil.
Motivation
Cloudflare sometimes provides a
cf
object with noasn
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.