mirror of
https://github.com/go-gitea/gitea
synced 2024-12-22 16:44:26 +00:00
f35e2b0cd1
Fixes 69 typescript errors found in the `admin` and `markup` folders. --------- Co-authored-by: Giteabot <teabot@gitea.io>
9 lines
351 B
TypeScript
9 lines
351 B
TypeScript
export function displayError(el: Element, err: Error): void {
|
|
el.classList.remove('is-loading');
|
|
const errorNode = document.createElement('pre');
|
|
errorNode.setAttribute('class', 'ui message error markup-block-error');
|
|
errorNode.textContent = err.message || String(err);
|
|
el.before(errorNode);
|
|
el.setAttribute('data-render-done', 'true');
|
|
}
|