From 7bf16d1514c94f2a45d7b07af1a4c803af02f542 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Joshua=20R=C3=BCsweg?= Date: Sun, 22 Jul 2018 18:43:55 +0200 Subject: [PATCH] Fix summary selector for singleItems See #2508 --- .../files/js/WoltLabSuite/Core/Ui/Reaction/CountButtons.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Reaction/CountButtons.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Reaction/CountButtons.js index 18d60674e9..1bd56a00f4 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Reaction/CountButtons.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Reaction/CountButtons.js @@ -166,7 +166,12 @@ define( * @param {object} elementData */ _initReactionCountButtons: function(element, elementData) { - var summaryList = elBySel(this._options.summaryListSelector, element); + if (this._options.isSingleItem) { + var summaryList = elBySel(this._options.summaryListSelector); + } + else { + var summaryList = elBySel(this._options.summaryListSelector, element); + } if (summaryList !== null) { var elements = elBySelAll('li', summaryList); -- 2.20.1