Skip to content

Commit

Permalink
support new workers
Browse files Browse the repository at this point in the history
  • Loading branch information
penalosa committed Oct 3, 2024
1 parent 472b15d commit cc00903
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions packages/wrangler/src/deploy/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -382,10 +382,14 @@ async function ensureBindingsExist(
}

assert(accountId, "Missing accountId");

const settings = await fetchResult<{
let settings: {
bindings: { name: string }[];
}>(`/accounts/${accountId}/workers/scripts/${name}/settings`);
} = { bindings: [] };
try {
settings = await fetchResult<{
bindings: { name: string }[];
}>(`/accounts/${accountId}/workers/scripts/${name}/settings`);
} catch {}

const existingBindings = Object.fromEntries(
settings.bindings.map((b) => [b.name, b])
Expand Down

0 comments on commit cc00903

Please sign in to comment.