mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-10-21 21:16:10 +08:00
added proper error message
This commit is contained in:
parent
83114dfcd7
commit
851ae1adc5
1 changed files with 7 additions and 0 deletions
|
@ -278,6 +278,13 @@ export async function screenshot(): Promise<void> {
|
|||
.then(() => {
|
||||
Notifications.add("Copied to clipboard", 1, 2);
|
||||
revertScreenshot();
|
||||
})
|
||||
.catch((e: any) => {
|
||||
Notifications.add(
|
||||
"Error saving image to clipboard: " + e.message,
|
||||
-1
|
||||
);
|
||||
revertScreenshot();
|
||||
});
|
||||
}
|
||||
} catch (e: any) {
|
||||
|
|
Loading…
Add table
Reference in a new issue