From 2e97a69ce70bb9c1596ecb1a1af9953c46fa3cf5 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Thu, 9 Jul 2015 17:58:36 +0200 Subject: [PATCH] `AjaxRequest` failed if response was empty --- wcfsetup/install/files/js/WoltLab/WCF/Ajax/Request.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wcfsetup/install/files/js/WoltLab/WCF/Ajax/Request.js b/wcfsetup/install/files/js/WoltLab/WCF/Ajax/Request.js index 081863e232..c0c73e86f7 100644 --- a/wcfsetup/install/files/js/WoltLab/WCF/Ajax/Request.js +++ b/wcfsetup/install/files/js/WoltLab/WCF/Ajax/Request.js @@ -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(); } } -- 2.20.1