1
0
forked from ScoDoc/ScoDoc

Merge pull request 'Gestion des données JSON invalides pour le relevé BUT' (#371) from lehmann/ScoDoc-Front:dev93 into dev93

Reviewed-on: https://scodoc.org/git/ScoDoc/ScoDoc/pulls/371
This commit is contained in:
Emmanuel Viennet 2022-04-24 17:26:40 +02:00
commit dcddec1ee6

View File

@ -31,6 +31,18 @@
display: none;
}`;
releve.shadowRoot.appendChild(style);
})
.catch(error => {
let div = document.createElement("div");
div.innerText = "Une erreur s'est produite lors du transfère des données.";
div.style.fontSize = "24px";
div.style.color = "#d93030";
let releve = document.querySelector("releve-but");
releve.after(div);
releve.remove();
throw 'Fin du script - données invalides';
});
document.querySelector("html").style.scrollBehavior = "smooth";
</script>