|
@@ -8,10 +8,7 @@
|
|
|
* @param {string} fallbackString
|
|
|
* @returns {Promise}
|
|
|
*/
|
|
|
-export default function copyToClipboard (textToCopy, fallbackString) {
|
|
|
- // TODO: make `fallbackString` an optional parameter instead.
|
|
|
- fallbackString ||= 'Copy the URL below' // eslint-disable-line no-param-reassign
|
|
|
-
|
|
|
+export default function copyToClipboard (textToCopy, fallbackString = 'Copy the URL below') {
|
|
|
return new Promise((resolve) => {
|
|
|
const textArea = document.createElement('textarea')
|
|
|
textArea.setAttribute('style', {
|