Handle uppercase APP_URL

This commit is contained in:
Hillel Coren 2018-04-29 11:14:34 +03:00
parent 6b8fbce3ea
commit 3f32a14b1a

View File

@ -1483,7 +1483,7 @@
$('#saveButton, #emailButton, #draftButton').attr('disabled', true); $('#saveButton, #emailButton, #draftButton').attr('disabled', true);
// if save fails ensure user can try again // if save fails ensure user can try again
$.post('{{ url($url) }}', $('.main-form').serialize(), function(data) { $.post('{{ url($url) }}', $('.main-form').serialize(), function(data) {
if (data && data.indexOf('http') === 0) { if (data && data.toLowerCase().indexOf('http') === 0) {
NINJA.formIsChanged = false; NINJA.formIsChanged = false;
location.href = data; location.href = data;
} else { } else {