`AjaxRequest` failed if response was empty
authorAlexander Ebert <ebert@woltlab.com>
Thu, 9 Jul 2015 15:58:36 +0000 (17:58 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Thu, 9 Jul 2015 15:58:36 +0000 (17:58 +0200)
wcfsetup/install/files/js/WoltLab/WCF/Ajax/Request.js

index 081863e232d75b6929589635e83e9d078aceec36..c0c73e86f723020639d86347e0f85da532bbfa60 100644 (file)
@@ -212,7 +212,7 @@ define(['Core', 'Language', 'DOM/ChangeListener', 'DOM/Util', 'UI/Dialog', 'Wolt
                                        }
                                        
                                        // 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 = data.returnValues.template.trim();
                                        }
                                }