Skip to content

Commit f2bbce3

Browse files
committed
patching stuff
1 parent 0789b85 commit f2bbce3

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

js/copy-to-llm.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,10 @@
363363
const slug = getPageSlug();
364364

365365
const { text, status } = await fetchMarkdown(slug);
366-
if (text) {
366+
367+
if (status === 404) {
368+
showToast(NO_MARKDOWN_MESSAGE);
369+
} else if (text) {
367370
copySucceeded = await copyToClipboard(
368371
text,
369372
copyButton,
@@ -372,8 +375,6 @@
372375
if (!copySucceeded) {
373376
showCopyError(copyButton);
374377
}
375-
} else if (status === 404) {
376-
showToast(NO_MARKDOWN_MESSAGE);
377378
} else {
378379
showCopyError(copyButton);
379380
}
@@ -500,4 +501,4 @@
500501
} else {
501502
initialize();
502503
}
503-
})();
504+
})();

0 commit comments

Comments
 (0)