perf[clipboard.js]: remove redundant code (#2307)

This commit is contained in:
MaYuanhai 2019-06-30 11:09:19 +08:00 committed by 花裤衩
parent 35adfcef3f
commit ef167ff064
1 changed files with 0 additions and 4 deletions

View File

@ -22,14 +22,10 @@ export default function handleClipboard(text, event) {
}) })
clipboard.on('success', () => { clipboard.on('success', () => {
clipboardSuccess() clipboardSuccess()
clipboard.off('error')
clipboard.off('success')
clipboard.destroy() clipboard.destroy()
}) })
clipboard.on('error', () => { clipboard.on('error', () => {
clipboardError() clipboardError()
clipboard.off('error')
clipboard.off('success')
clipboard.destroy() clipboard.destroy()
}) })
clipboard.onClick(event) clipboard.onClick(event)