perf[clipboard.js]: remove redundant code (#2307)
This commit is contained in:
parent
35adfcef3f
commit
ef167ff064
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue