Skip to content

Commit

Permalink
Update ui.js
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinLinus authored Mar 9, 2020
1 parent 3be3be6 commit 097c3c3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/scripts/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ class PeersUI {
const files = e.clipboardData.files || e.clipboardData.items
.filter(i => i.type.indexOf('image') > -1)
.map(i => i.getAsFile());

const peers = document.querySelectorAll('x-peer').length;
// send the pasted image content to the only peer if there is one
// otherwise, select the peer somehow by notifying the client that
// "image data has been pasted, click the client to which to send it"
// not implemented
if (files.length > 0 && $$('x-peer').length === 1) {
if (files.length > 0 && peers.length === 1) {
Events.fire('files-selected', {
files: files,
to: $$('x-peer').id
Expand Down

0 comments on commit 097c3c3

Please sign in to comment.