Skip to content

Commit cfbba80

Browse files
dirkdev98posva
andauthored
fix(edit-link): let frontmatter overwrite global editLink (#340)
Co-authored-by: Eduardo San Martin Morote <[email protected]>
1 parent aa9f909 commit cfbba80

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/client/theme-default/composables/editLink.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@ export function useEditLink() {
1616
editLinks
1717
} = theme.value
1818

19-
const showEditLink = frontmatter.value.editLink || editLinks
19+
const showEditLink =
20+
frontmatter.value.editLink != null
21+
? frontmatter.value.editLink
22+
: editLinks
2023
const { relativePath } = page.value
2124

2225
if (!showEditLink || !relativePath || !repo) {

0 commit comments

Comments
 (0)