From 144d083563cf20f90ccf7e9c2ca3f15a96f8dd16 Mon Sep 17 00:00:00 2001 From: Outvi V Date: Fri, 26 Jan 2024 21:56:29 +0800 Subject: [PATCH] fix: use .arrayBuffer() instead of .buffer() --- dist/index.js | 2 +- index.js | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dist/index.js b/dist/index.js index 8ded9e3..b8904c4 100644 --- a/dist/index.js +++ b/dist/index.js @@ -2850,7 +2850,7 @@ async function tryFetch(url, retryTimes) { let result; for (let i = 0; i <= retryTimes; i++) { result = await fetch(url) - .then((x) => x.buffer()) + .then((x) => x.arrayBuffer()) .catch((err) => { console.error( `${ diff --git a/index.js b/index.js index a0d8985..4463532 100644 --- a/index.js +++ b/index.js @@ -16,7 +16,7 @@ async function tryFetch(url, retryTimes) { let result; for (let i = 0; i <= retryTimes; i++) { result = await fetch(url) - .then((x) => x.buffer()) + .then((x) => x.arrayBuffer()) .catch((err) => { console.error( `${ diff --git a/package.json b/package.json index 2293c1d..4e7e462 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "github", "actions" ], - "version": "1.4.0", + "version": "1.5.1", "description": "An action used to filter out a URL and download files for further works.", "main": "index.js", "repository": "git@github.com:suisei-cn/actions-download-file.git",