diff --git a/resources/views/invoices/pdf.blade.php b/resources/views/invoices/pdf.blade.php index 52185f45b7ce..fb3332047efe 100644 --- a/resources/views/invoices/pdf.blade.php +++ b/resources/views/invoices/pdf.blade.php @@ -117,8 +117,9 @@ try { return getPDFString(refreshPDFCB, force); } catch (exception) { - if (location.href.indexOf('/view/')) { - var url = location.href.replace('/view/', '/download/') + '?base64=true'; + var href = location.href; + if (href.indexOf('/view/') && href.indexOf('phantomjs') == -1) { + var url = href.replace('/view/', '/download/') + '?base64=true'; $.get(url, function(result) { refreshPDFCB(result); })