1
0
mirror of https://github.com/24eme/signaturepdf.git synced 2023-08-25 09:33:08 +02:00

Fix javascript bug

This commit is contained in:
Vincent LAURENT 2022-03-31 13:25:29 +02:00
parent 0ca295070d
commit b5d3b990fb

View File

@ -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';