location while error
This commit is contained in:
@@ -49,6 +49,7 @@ document.addEventListener("DOMContentLoaded", () => {
|
||||
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
window.location.href = '#answer';
|
||||
showErrors(JSON.parse(err.message));
|
||||
}
|
||||
});
|
||||
@@ -68,13 +69,12 @@ const fieldMap = {
|
||||
errorElem.className = 'formError';
|
||||
errorElem.style.cssText = `
|
||||
color: red;
|
||||
margin-top: 10px;
|
||||
margin-bottom: 10px;
|
||||
font-size: medium;
|
||||
line-height: 100%;
|
||||
transition: 3s;
|
||||
text-decoration: underline;
|
||||
font-weight: bold;
|
||||
font-family: Arial, sans-serif;
|
||||
`;
|
||||
el.after(errorElem);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user