Skip to content

Commit

Permalink
fix: return null if the URL is undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
piquark6046 committed Oct 27, 2024
1 parent d167edc commit 0372ccf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
3 changes: 3 additions & 0 deletions sources/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 0372ccf

Please sign in to comment.