Prevent PhantomJS error loop

This commit is contained in:
Hillel Coren 2017-05-24 20:40:43 +03:00
parent f2d59f098f
commit f82eecf2fb

View File

@ -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);
})