From cfbba80a0a6e33bcb2ca3d4450fb9624dcd6d140 Mon Sep 17 00:00:00 2001 From: Dirk de Visser Date: Thu, 22 Jul 2021 10:23:13 +0200 Subject: [PATCH] fix(edit-link): let frontmatter overwrite global editLink (#340) Co-authored-by: Eduardo San Martin Morote --- src/client/theme-default/composables/editLink.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/client/theme-default/composables/editLink.ts b/src/client/theme-default/composables/editLink.ts index 80e85373b6b9..f6cfdcc30063 100644 --- a/src/client/theme-default/composables/editLink.ts +++ b/src/client/theme-default/composables/editLink.ts @@ -16,7 +16,10 @@ export function useEditLink() { editLinks } = theme.value - const showEditLink = frontmatter.value.editLink || editLinks + const showEditLink = + frontmatter.value.editLink != null + ? frontmatter.value.editLink + : editLinks const { relativePath } = page.value if (!showEditLink || !relativePath || !repo) {