Fix commenting by guest if captchas are disabled
authorMatthias Schmidt <gravatronics@live.com>
Mon, 14 Aug 2017 15:18:16 +0000 (17:18 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Mon, 14 Aug 2017 15:18:16 +0000 (17:18 +0200)
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Comment/Add.js

index 40cd9cdd84efbfe39816cc475b1bbf05ce7bc72d..15072683e6ff492f726a146a1ce20b2ba226219d 100644 (file)
@@ -101,7 +101,9 @@ define(['Ajax', 'Core', 'EventHandler', 'Language', 'Dom/ChangeListener', 'Dom/U
                                }
                        };
                        
-                       parameters = Core.extend(parameters, ControllerCaptcha.getData('commentAdd'));
+                       if (ControllerCaptcha.has('commentAdd')) {
+                               parameters = Core.extend(parameters, ControllerCaptcha.getData('commentAdd'));
+                       }
                        
                        this._submit(undefined, parameters);
                },