Browse Source

@uppy/dashboard: change `copyToClipboard` signature (#3933)

Antoine du Hamel 2 years ago
parent
commit
9190ed5f43
1 changed files with 1 additions and 4 deletions
  1. 1 4
      packages/@uppy/dashboard/src/utils/copyToClipboard.js

+ 1 - 4
packages/@uppy/dashboard/src/utils/copyToClipboard.js

@@ -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', {