Skip to content

Fix KV namespace binding in worker and update references to 'work' - #1

Merged
Firetech123 merged 1 commit into
feature/quotation-web-kv-weel-9375916973493075140from
fix-kv-put-undefined-2758899358671140114
Nov 1, 2026
Merged

Firetech123 merged 1 commit into
feature/quotation-web-kv-weel-9375916973493075140from
fix-kv-put-undefined-2758899358671140114

Conversation

@Firetech123

Copy link
Copy Markdown
Owner

Resolved runtime error Cannot read properties of undefined (reading 'put') in worker.js:

  • In worker.js, dynamically resolve the KV namespace binding using const kv = env && (env.work || env.weel); so operations succeed regardless of whether the KV namespace is bound as work or weel.
  • Replaced mixed env.work and env.weel calls with consistent kv operations across GET, POST, PUT, and DELETE endpoints.
  • Updated index.html UI badges, modals, and status notices to reflect KV namespace 'work'.
  • Verified with unit tests covering env.work, env.weel, and missing KV configurations, as well as Playwright UI visual checks.

PR created automatically by Jules for task 2758899358671140114 started by @Firetech123

Resolve KV namespace via `env.work || env.weel` across all worker
endpoints, preventing runtime error on put operations. Update UI and
status references to KV namespace 'work'.

Co-authored-by: Firetech123 <317678227+Firetech123@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying work with  Cloudflare Pages  Cloudflare Pages

Latest commit: 055c7e7
Status: ✅  Deploy successful!
Preview URL: https://7171b2c3.work-6m9.pages.dev
Branch Preview URL: https://fix-kv-put-undefined-2758899.work-6m9.pages.dev

View logs

@Firetech123
Firetech123 merged commit 31e7eee into feature/quotation-web-kv-weel-9375916973493075140 Nov 1, 2026
1 check passed
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.

1 participant