Skip to content

Commit

Permalink
fix: normalise account_id = '' to account_id: undefined (#1365)
Browse files Browse the repository at this point in the history
In older templates, (i.e made for wrangler 1.x), `account_id =''` is considered as a valid input, but then ignored. With wrangler 2, when running wrangler dev, we log an error, but it fixes itself after we get an account id. Much like #1329, the fix here is to normalise that value when we see it, and replace it with `undefined` while logging a warning.

This fix also tweaks the messaging for a blank route value to suggest some user action.
  • Loading branch information
threepointone authored Jun 28, 2022
1 parent d2b1142 commit b9f7200
Show file tree
Hide file tree
Showing 4 changed files with 2,291 additions and 2,218 deletions.
9 changes: 9 additions & 0 deletions .changeset/slow-pianos-impress.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"wrangler": patch
---

fix: normalise `account_id = ''` to `account_id: undefined`

In older templates, (i.e made for wrangler 1.x), `account_id =''` is considered as a valid input, but then ignored. With wrangler 2, when running wrangler dev, we log an error, but it fixes itself after we get an account id. Much like https://github.com/cloudflare/wrangler2/issues/1329, the fix here is to normalise that value when we see it, and replace it with `undefined` while logging a warning.

This fix also tweaks the messaging for a blank route value to suggest some user action.
Loading

0 comments on commit b9f7200

Please sign in to comment.