From 96852906587a44ff10617a70379041ef453d6710 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Fri, 13 May 2016 10:40:04 +0300 Subject: [PATCH] check responseJSON --- public/src/ajaxify.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/src/ajaxify.js b/public/src/ajaxify.js index 993e45eb81..4f452f7b08 100644 --- a/public/src/ajaxify.js +++ b/public/src/ajaxify.js @@ -140,7 +140,7 @@ $(document).ready(function() { window.location.href = config.relative_path + '/login'; return; } else if (status === 302 || status === 308) { - if (data.responseJSON.external) { + if (data.responseJSON && data.responseJSON.external) { window.location.href = data.responseJSON.external; } else if (typeof data.responseJSON === 'string') { ajaxify.go(data.responseJSON.slice(1), callback, quiet);