From 7aba02789694a43a8f1caa7276dd024ec0b28a7e Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Tue, 21 Mar 2017 10:13:48 +0200 Subject: [PATCH] Minor tweaks --- app/Exceptions/Handler.php | 3 +-- resources/views/invoices/view.blade.php | 5 ++++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index 60c9b6f17abf..9a44e2a9eefa 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -82,8 +82,7 @@ class Handler extends ExceptionHandler } if ($e instanceof TokenMismatchException) { - // prevent loop since the page auto-submits - if ($request->path() != 'get_started' && $request->path() != 'save_sidebar_state') { + if (! in_array($request->path(), ['get_started', 'save_sidebar_state'])) { // https://gist.github.com/jrmadsen67/bd0f9ad0ef1ed6bb594e return redirect() ->back() diff --git a/resources/views/invoices/view.blade.php b/resources/views/invoices/view.blade.php index 24abba4e49c2..c1d72289eb94 100644 --- a/resources/views/invoices/view.blade.php +++ b/resources/views/invoices/view.blade.php @@ -257,7 +257,10 @@ data: data, success: function(response) { redirectToPayment(); - } + }, + error: function(response) { + // TODO + } }); }