1
0
Fork 0
mirror of https://github.com/24eme/signaturepdf synced 2024-05-29 03:52:31 +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';