diff --git a/resources/views/invoices/edit.blade.php b/resources/views/invoices/edit.blade.php index 3ccd975ff9d0..a0302406a0fb 100644 --- a/resources/views/invoices/edit.blade.php +++ b/resources/views/invoices/edit.blade.php @@ -1429,7 +1429,7 @@ $('#saveButton, #emailButton, #draftButton').attr('disabled', true); // if save fails ensure user can try again $.post('{{ url($url) }}', $('.main-form').serialize(), function(data) { - if (data && data.startsWith('http')) { + if (data && data.startsWith && data.startsWith('http')) { NINJA.formIsChanged = false; location.href = data; } else {