fix: error toast on lost connection

This commit is contained in:
Barış Soner Uşaklı
2023-06-13 12:47:43 -04:00
parent 4d3f5ecf56
commit 2c89d78494
2 changed files with 3 additions and 2 deletions

View File

@@ -477,7 +477,8 @@ ajaxify.widgets = { render: render };
translator.translate(`[[global:reconnecting-message, ${config.siteTitle}]]`);
Benchpress.registerLoader(ajaxify.loadTemplate);
Benchpress.setGlobal('config', config);
Benchpress.render('500', {}); // loads and caches the 500.tpl
Benchpress.render('500', {}); // loads and caches 500.tpl
Benchpress.render('partials/toast'); // loads and caches partials/toast
});
}());

View File

@@ -98,7 +98,7 @@ define('forum/infinitescroll', ['hooks', 'alerts'], function (hooks, alerts) {
});
}).fail(function (jqXHR) {
loadingMore = false;
alerts.error(String(jqXHR.responseJSON || jqXHR.statusText));
alerts.error(String(jqXHR.responseJSON || '[[error:no-connection]]'));
});
};