summaryrefslogtreecommitdiff
path: root/source/features/repo-age.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'source/features/repo-age.tsx')
-rw-r--r--source/features/repo-age.tsx7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/features/repo-age.tsx b/source/features/repo-age.tsx
index d01b9355..f453aeea 100644
--- a/source/features/repo-age.tsx
+++ b/source/features/repo-age.tsx
@@ -16,7 +16,7 @@ const dateFormatter = new Intl.DateTimeFormat('en-US', {
day: 'numeric'
});
-const getRepoAge = async (commitSha: string, commitsCount: number): Promise<[string, string]> => {
+const getRepoAge = async (commitSha: string, commitsCount: number): Promise<[committedDate: string, resourcePath: string]> => {
const {repository} = await api.v4(`
repository(${getRepoGQL()}) {
defaultBranchRef {
@@ -42,7 +42,7 @@ const getRepoAge = async (commitSha: string, commitsCount: number): Promise<[str
return [committedDate, resourcePath];
};
-const getFirstCommit = cache.function(async (): Promise<[string, string]> => {
+const getFirstCommit = cache.function(async (): Promise<[committedDate: string, resourcePath: string]> => {
const {repository} = await api.v4(`
repository(${getRepoGQL()}) {
defaultBranchRef {
@@ -122,6 +122,9 @@ void features.add({
include: [
pageDetect.isRepoRoot
],
+ exclude: [
+ pageDetect.isEmptyRepoRoot
+ ],
waitForDomReady: false,
init
});