A platform for community discussion. Free, open, simple.
DEV: Improve browser-update compatibility (#24852)
David Taylor0f3a6cf042b5
diff --git a/app/assets/javascripts/discourse/scripts/browser-update.js b/app/assets/javascripts/discourse/scripts/browser-update.jsindex f3525b5d0ac..8ec7ecaccbc 100644--- a/app/assets/javascripts/discourse/scripts/browser-update.js+++ b/app/assets/javascripts/discourse/scripts/browser-update.js@@ -45,8 +45,8 @@}// retrieve localized browser upgrade text- var t = I18n.t("browser_update"); // eslint-disable-line no-undef- if (t.indexOf(".browser_update]") !== -1) {+ var t = window.I18n && I18n.t("browser_update"); // eslint-disable-line no-undef+ if (!t || t.indexOf(".browser_update]") !== -1) {// very old browsers might fail to load even translationst ='Unfortunately, <a href="https://www.discourse.org/faq/#browser">your browser is unsupported</a>. Please <a href="https://browsehappy.com">switch to a supported browser</a> to view rich content, log in and reply.';