Remove try/catch block of copyRevisionHash()

This commit is contained in:
Marliana Lara
2017-05-12 10:02:52 -04:00
parent 82683d423f
commit 62c4efe19b
3 changed files with 5 additions and 13 deletions

View File

@@ -38,18 +38,10 @@ export default
textArea.style.background = 'transparent'; textArea.style.background = 'transparent';
textArea.value = full_revision; textArea.value = full_revision;
document.body.appendChild(textArea); document.body.appendChild(textArea);
textArea.select(); textArea.select();
try { document.execCommand('copy');
var successful = document.execCommand('copy');
var msg = successful ? 'successful' : 'unsuccessful';
console.log('Copying text command was ' + msg);
} catch (err) {
console.log('Oops, unable to copy');
}
document.body.removeChild(textArea); document.body.removeChild(textArea);
}; };