Fix summary selector for singleItems
authorJoshua Rüsweg <josh@bastelstu.be>
Sun, 22 Jul 2018 16:43:55 +0000 (18:43 +0200)
committerJoshua Rüsweg <josh@bastelstu.be>
Sun, 22 Jul 2018 16:43:55 +0000 (18:43 +0200)
See #2508

wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Reaction/CountButtons.js

index 18d60674e9e268ac854b3e53e213ebad91f89ae6..1bd56a00f4528c83653c798d8eb4b493dda0b785 100644 (file)
@@ -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);