evanderkoogh / otel-cf-workers

An OpenTelemetry compatible library for instrumenting and exporting traces for Cloudflare Workers
BSD 3-Clause "New" or "Revised" License
208 stars 39 forks source link

fix: Set has_result to false when there is no value returned in kv.getWithMetadata() #93

Closed jahands closed 4 months ago

jahands commented 4 months ago

We currently set has_result to true because getWithMetadata always returns an object with value/metadata even if the key didn't exist.

This should still return true when the key has an empty value because !!emptyString = true