🔨 avoid using es2020 for vercel
This commit is contained in:
@@ -12,7 +12,9 @@ export const getGithubUserContribution = async (userName: string) => {
|
|||||||
dom.window.document.querySelectorAll(".legend > li")
|
dom.window.document.querySelectorAll(".legend > li")
|
||||||
).map(
|
).map(
|
||||||
(element) =>
|
(element) =>
|
||||||
element.getAttribute("style")?.match(/background\-color: +(#\w+)/)?.[1]!
|
(element.getAttribute("style") || "").match(
|
||||||
|
/background\-color: +(#\w+)/
|
||||||
|
)?.[1]!
|
||||||
);
|
);
|
||||||
|
|
||||||
const cells = Array.from(
|
const cells = Array.from(
|
||||||
@@ -35,6 +37,6 @@ export const getGithubUserContribution = async (userName: string) => {
|
|||||||
|
|
||||||
type ThenArg<T> = T extends PromiseLike<infer U> ? U : T;
|
type ThenArg<T> = T extends PromiseLike<infer U> ? U : T;
|
||||||
|
|
||||||
export type Cell = ThenArg<
|
export type Res = ThenArg<ReturnType<typeof getGithubUserContribution>>;
|
||||||
ReturnType<typeof getGithubUserContribution>
|
|
||||||
>["cells"][number];
|
export type Cell = Res["cells"][number];
|
||||||
|
|||||||
Reference in New Issue
Block a user