From b5d3b990fb77436604e6f30ec439e93e331d8faf Mon Sep 17 00:00:00 2001 From: Vincent LAURENT Date: Thu, 31 Mar 2022 13:25:29 +0200 Subject: [PATCH] Fix javascript bug --- public/js/signature.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/public/js/signature.js b/public/js/signature.js index d5fccb6..f82e0db 100644 --- a/public/js/signature.js +++ b/public/js/signature.js @@ -947,14 +947,16 @@ var pageSignature = async function(url) { fontCaveat = font; }); + let pdfBlob = null; + if(hash) { var response = await fetch(url); if(response.status != 200) { return; } - let pdfBlob = await response.blob(); + pdfBlob = await response.blob(); } else { - let pdfBlob = await getPDFBlobFromCache(url); + pdfBlob = await getPDFBlobFromCache(url); } if(!pdfBlob) { document.location = '/signature';