1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-12-04 14:46:57 -05:00
gitea/web_src/js/markup/common.ts

9 lines
351 B
TypeScript
Raw Normal View History

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');
}