We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e1790c8 commit 2e946dcCopy full SHA for 2e946dc
app/pages/package/[[org]]/[name].vue
@@ -119,8 +119,7 @@ function copyViaExecCommand(text: string): boolean {
119
textarea.select()
120
try {
121
return document.execCommand('copy')
122
- }
123
- finally {
+ } finally {
124
document.body.removeChild(textarea)
125
}
126
@@ -138,14 +137,15 @@ async function copyReadmeHandler() {
138
137
139
await navigator.clipboard.writeText(markdown)
140
success = true
141
142
- catch {
+ } catch {
143
success = copyViaExecCommand(markdown)
144
145
146
if (success) {
147
copiedReadme.value = true
148
- setTimeout(() => { copiedReadme.value = false }, 2000)
+ setTimeout(() => {
+ copiedReadme.value = false
+ }, 2000)
149
150
151
0 commit comments