Template
1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo synced 2024-11-22 09:54:24 +01:00

Compare commits

..

No commits in common. "05bc80633d1abd20bab64c0039c95b6c6e691bbf" and "c023e6d23fb2a5d8ac2628e26319a8da79199962" have entirely different histories.

View file

@ -8,8 +8,6 @@ __webpack_public_path__ = `${window.config?.assetUrlPrefix ?? '/assets'}/`;
export function showGlobalErrorMessage(msg) {
const pageContent = document.querySelector('.page-content');
if (!pageContent) return;
// Prevent a wall of errors being presented to the user.
if (document.querySelectorAll('.js-global-error').length >= 3) return;
const el = document.createElement('div');
el.innerHTML = `<div class="ui container negative message center aligned js-global-error" style="white-space: pre-line;"></div>`;
el.childNodes[0].textContent = msg;