From: Joshua Rüsweg Date: Fri, 24 May 2019 14:06:01 +0000 (+0200) Subject: Fix reaction sorting function X-Git-Tag: 5.2.0_Alpha_1~75 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=63d47cfc035a3e82993fc88b618c6789a6667132;p=GitHub%2FWoltLab%2FWCF.git Fix reaction sorting function See #2508 --- diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Reaction/Handler.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Reaction/Handler.js index f498d24546..73006a2ede 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Reaction/Handler.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Reaction/Handler.js @@ -330,12 +330,7 @@ define( // sort the array sortedReactionTypes.sort(function (a, b) { - if (a.showOrder > b.showOrder) { - return 1; - } - else { - return -1; - } + return a.showOrder - b.showOrder; }); return sortedReactionTypes;