mirror of
https://github.com/nextui-org/nextui.git
synced 2025-12-08 19:26:11 +00:00
chore: typo (#2353)
This commit is contained in:
parent
0b5cde7bc4
commit
3be8c621a1
@ -2,16 +2,16 @@ import {GITHUB_API_URL, REPO_NAME} from "./constants";
|
|||||||
import {getError} from "./utils";
|
import {getError} from "./utils";
|
||||||
|
|
||||||
export async function getLatestTag() {
|
export async function getLatestTag() {
|
||||||
let lastestTag: string;
|
let latestTag: string;
|
||||||
const res = await fetch(`${GITHUB_API_URL}/repos/${REPO_NAME}/releases/latest`);
|
const res = await fetch(`${GITHUB_API_URL}/repos/${REPO_NAME}/releases/latest`);
|
||||||
|
|
||||||
if (res.ok) {
|
if (res.ok) {
|
||||||
const data = await res.json();
|
const data = await res.json();
|
||||||
|
|
||||||
lastestTag = data.tag_name;
|
latestTag = data.tag_name;
|
||||||
} else {
|
} else {
|
||||||
throw await getError("GitHub latest tag fetch failed", res);
|
throw await getError("GitHub latest tag fetch failed", res);
|
||||||
}
|
}
|
||||||
|
|
||||||
return lastestTag;
|
return latestTag;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user