From 6ff5ed6d232b8e6093c199cd83de0025641447bc Mon Sep 17 00:00:00 2001 From: Jakob Borg Date: Fri, 7 Jul 2023 07:25:24 +0200 Subject: [PATCH] gui: Avoid spurious comma in shared-with device list (fixes #8967) (#8970) --- gui/default/index.html | 4 ++-- gui/default/syncthing/core/syncthingController.js | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/gui/default/index.html b/gui/default/index.html index e5c7db1f2..57cd558a7 100644 --- a/gui/default/index.html +++ b/gui/default/index.html @@ -555,8 +555,8 @@  Shared With - - + + {{deviceName(devices[device.deviceID])}}1, {{deviceName(devices[device.deviceID])}}2, {{deviceName(devices[device.deviceID])}}, diff --git a/gui/default/syncthing/core/syncthingController.js b/gui/default/syncthing/core/syncthingController.js index 208cb5617..6a77e514e 100755 --- a/gui/default/syncthing/core/syncthingController.js +++ b/gui/default/syncthing/core/syncthingController.js @@ -1892,8 +1892,11 @@ angular.module('syncthing.core') } }; - $scope.otherDevices = function () { - return $scope.deviceList().filter(function (n) { + $scope.otherDevices = function (devices) { + if (devices === undefined) { + devices = $scope.deviceList(); + } + return devices.filter(function (n) { return n.deviceID !== $scope.myID; }); };