Skip to content

Commit 9c25d9b

Browse files
authored
fix: when error copyHtml (#2663)
1 parent 3f012c4 commit 9c25d9b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/components/CopyPageButton/index.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,12 @@ const CopyDropdownButton: React.FC = () => {
4949
if (response.status === 200) {
5050
navigator.clipboard.writeText(response.data);
5151
} else {
52-
alert($t("Failed to copy markdown"));
52+
copyHtml();
5353
}
5454
})
55+
.catch(() => {
56+
copyHtml();
57+
})
5558
.finally(() => {
5659
setLoading(false);
5760
setTimeout(() => {

0 commit comments

Comments
 (0)