From 0372ccf841bbd60cd7394a52805f7bc4bb5d608b Mon Sep 17 00:00:00 2001 From: piquark6046 Date: Sun, 27 Oct 2024 23:54:21 +0000 Subject: [PATCH] fix: return null if the URL is undefined --- package.json | 2 +- sources/github.ts | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 92f19e4..9f2d06b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "jsdelivr-purge", - "version": "1.0.1", + "version": "1.0.2", "repository": { "type": "git", "url": "https://github.com/List-KR/jsdelivr-purge" diff --git a/sources/github.ts b/sources/github.ts index 8be777f..11022a2 100644 --- a/sources/github.ts +++ b/sources/github.ts @@ -43,6 +43,9 @@ export class HistoryManager { return null } const HistoryURL = await this.ListHistory()[0] + if (typeof HistoryURL === 'undefined') { + return null + } const HistoryCompressedBuffer = await got(HistoryURL, { https: { minVersion: 'TLSv1.3',