Update ui.js
This commit is contained in:
parent
787f03b022
commit
3be3be6926
1 changed files with 2 additions and 2 deletions
|
@ -12,7 +12,7 @@ class PeersUI {
|
|||
Events.on('peer-left', e => this._onPeerLeft(e.detail));
|
||||
Events.on('peers', e => this._onPeers(e.detail));
|
||||
Events.on('file-progress', e => this._onFileProgress(e.detail));
|
||||
window.addEventListener('paste', e => this._onPaste(e));
|
||||
Events.on('paste', e => this._onPaste(e));
|
||||
}
|
||||
|
||||
_onPeerJoined(peer) {
|
||||
|
@ -44,7 +44,7 @@ class PeersUI {
|
|||
}
|
||||
|
||||
_onPaste(e) {
|
||||
const files = e.clipboardData.items
|
||||
const files = e.clipboardData.files || e.clipboardData.items
|
||||
.filter(i => i.type.indexOf('image') > -1)
|
||||
.map(i => i.getAsFile());
|
||||
|
||||
|
|
Loading…
Reference in a new issue