From a0f46475dd4f97f1ca7a5ebf253ad983c0b429c2 Mon Sep 17 00:00:00 2001 From: schlagmichdoch Date: Fri, 20 Jan 2023 01:58:49 +0100 Subject: [PATCH] fix restart animation when last peer left --- public/scripts/ui.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/scripts/ui.js b/public/scripts/ui.js index 40b5845..d6d6ee3 100644 --- a/public/scripts/ui.js +++ b/public/scripts/ui.js @@ -77,7 +77,7 @@ class PeersUI { const $peer = $(peerId); if (!$peer) return; $peer.remove(); - setTimeout(_ => window.animateBackground(true), 1750); // Start animation again + if ($$('x-peers:empty')) setTimeout(_ => window.animateBackground(true), 1750); // Start animation again } _onPeerLeft(peerId) {