优化登录重试与配置清理
This commit is contained in:
@@ -24,7 +24,11 @@ function copyToClipboard(text: string): Promise<void> {
|
||||
try {
|
||||
const ok = document.execCommand('copy');
|
||||
document.body.removeChild(ta);
|
||||
ok ? resolve() : reject(new Error('execCommand copy failed'));
|
||||
if (ok) {
|
||||
resolve();
|
||||
} else {
|
||||
reject(new Error('execCommand copy failed'));
|
||||
}
|
||||
} catch (e) {
|
||||
document.body.removeChild(ta);
|
||||
reject(e);
|
||||
|
||||
Reference in New Issue
Block a user