Fixed WCF.Action.Proxy failing if server response is empty
authorAlexander Ebert <ebert@woltlab.com>
Sat, 20 Jul 2013 23:36:57 +0000 (01:36 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Sat, 20 Jul 2013 23:36:57 +0000 (01:36 +0200)
wcfsetup/install/files/js/WCF.js

index 124d66d3c7d7aadf90f9f7036fd0da0ab0b528e0..85727ca6c90a95f7bd0b2523883903537976fdff 100755 (executable)
@@ -1952,7 +1952,7 @@ WCF.Action.Proxy = Class.extend({
                // call child method if applicable
                if ($.isFunction(this.options.success)) {
                        // trim HTML before processing, see http://jquery.com/upgrade-guide/1.9/#jquery-htmlstring-versus-jquery-selectorstring
-                       if (data.returnValues && data.returnValues.template !== undefined) {
+                       if (data && data.returnValues && data.returnValues.template !== undefined) {
                                data.returnValues.template = $.trim(data.returnValues.template);
                        }