From 097c3c3f5020aa09cf5a41e81b8a4e3850c35f75 Mon Sep 17 00:00:00 2001 From: RobinLinus Date: Mon, 9 Mar 2020 22:47:35 +0100 Subject: [PATCH] Update ui.js --- client/scripts/ui.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/scripts/ui.js b/client/scripts/ui.js index b11dea7..86495b7 100644 --- a/client/scripts/ui.js +++ b/client/scripts/ui.js @@ -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