From 24d7c9fc90e6cbf3116f5ae84ce62c70c3d60a04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=AE=80=E7=AE=80aw?= <2801819967@qq.com> Date: Tue, 8 Oct 2024 11:30:07 +0800 Subject: [PATCH] Fix headers variable initialization (#71) --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 015ba6bb4..207f689d2 100644 --- a/src/index.js +++ b/src/index.js @@ -136,7 +136,7 @@ async function fetchToken(wwwAuthenticate, scope, authorization) { if (scope) { url.searchParams.set("scope", scope); } - headers = new Headers(); + const headers = new Headers(); if (authorization) { headers.set("Authorization", authorization); }