check responseJSON

v1.18.x
barisusakli 9 years ago
parent f9f4b3b91f
commit 9685290658

@ -140,7 +140,7 @@ $(document).ready(function() {
window.location.href = config.relative_path + '/login'; window.location.href = config.relative_path + '/login';
return; return;
} else if (status === 302 || status === 308) { } else if (status === 302 || status === 308) {
if (data.responseJSON.external) { if (data.responseJSON && data.responseJSON.external) {
window.location.href = data.responseJSON.external; window.location.href = data.responseJSON.external;
} else if (typeof data.responseJSON === 'string') { } else if (typeof data.responseJSON === 'string') {
ajaxify.go(data.responseJSON.slice(1), callback, quiet); ajaxify.go(data.responseJSON.slice(1), callback, quiet);

Loading…
Cancel
Save