From 28c06f0297869c598474276a81154835ab1ec074 Mon Sep 17 00:00:00 2001 From: Rahul Sethi <5822355+RamIdeas@users.noreply.github.com> Date: Fri, 8 Mar 2024 09:57:19 +0000 Subject: [PATCH] fix: latestDeployment is first not last --- packages/wrangler/src/versions/deploy.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/wrangler/src/versions/deploy.ts b/packages/wrangler/src/versions/deploy.ts index 51b2b90195b7f..89c3c794e8680 100644 --- a/packages/wrangler/src/versions/deploy.ts +++ b/packages/wrangler/src/versions/deploy.ts @@ -485,7 +485,7 @@ async function fetchLatestDeploymentVersions( `/accounts/${accountId}/workers/scripts/${workerName}/deployments` ); - const latestDeployment = deployments.at(-1); + const latestDeployment = deployments.at(0); if (!latestDeployment) return [[], new Map()]; const versionTraffic = new Map(