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