From 300db0615ff9baaebe74a4f45b1755a9bf3b878e Mon Sep 17 00:00:00 2001 From: Jarek Radosz Date: Thu, 29 Sep 2022 13:31:29 +0200 Subject: [PATCH] DEV: Fix `InstallTrigger` deprecation warnings on Firefox (#18380) "InstallTrigger is deprecated and will be removed in the future." --- .../discourse/app/pre-initializers/sniff-capabilities.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/app/pre-initializers/sniff-capabilities.js b/app/assets/javascripts/discourse/app/pre-initializers/sniff-capabilities.js index a6b3174956c..cb600d976e5 100644 --- a/app/assets/javascripts/discourse/app/pre-initializers/sniff-capabilities.js +++ b/app/assets/javascripts/discourse/app/pre-initializers/sniff-capabilities.js @@ -22,7 +22,7 @@ export default { caps.isAndroid = ua.includes("Android"); caps.isWinphone = ua.includes("Windows Phone"); caps.isOpera = !!window.opera || ua.includes(" OPR/"); - caps.isFirefox = typeof InstallTrigger !== "undefined"; + caps.isFirefox = ua.includes("Firefox"); caps.isChrome = !!window.chrome && !caps.isOpera; caps.isSafari = /Constructor/.test(window.HTMLElement) ||