Fixed handling of AJAX response data
authorAlexander Ebert <ebert@woltlab.com>
Mon, 8 Feb 2016 12:43:09 +0000 (13:43 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 8 Feb 2016 12:43:09 +0000 (13:43 +0100)
wcfsetup/install/files/js/WoltLab/WCF/Ui/Like/Handler.js

index d0d8d09e49b1d6bebcf3a578f2c7910ec2c07a86..eddbf8ba651dc52f8532dfb6612d3a8c27622e4c 100644 (file)
@@ -371,8 +371,8 @@ define(
                                elementData.users.push(StringUtil.escapeHTML(users[keys[i]].username));
                        }
                        
-                       if (data.isLiked == 1) elementData.liked = 1;
-                       else if (data.isDisliked) elementData.liked = -1;
+                       if (data.returnValues.isLiked == 1) elementData.liked = 1;
+                       else if (data.returnValues.isDisliked == 1) elementData.liked = -1;
                        else elementData.liked = 0;
                        
                        // update label