Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions app/pages/package/[[org]]/[name].vue
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ const {
const { copied: copiedReadme, copy: copyReadme } = useClipboard({
source: () => '',
copiedDuring: 2000,
legacy: true,
})

function prefetchReadmeMarkdown() {
Expand All @@ -108,9 +109,12 @@ function prefetchReadmeMarkdown() {
}

async function copyReadmeHandler() {
await fetchReadmeMarkdown()
let markdown = readmeMarkdownData.value?.markdown
if (!markdown) {
await fetchReadmeMarkdown()
markdown = readmeMarkdownData.value?.markdown
}
Comment thread
MathurAditya724 marked this conversation as resolved.
Outdated

const markdown = readmeMarkdownData.value?.markdown
if (!markdown) return

await copyReadme(markdown)
Expand Down
Loading