mirror of
https://github.com/discourse/discourse.git
synced 2026-08-13 06:25:11 -05:00
FIX: Feature detect globalThis (#14410)
* FIX: Feature detect globalThis So browsers without support will receive a warning and browse our JS-less view.
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
if (!window.WeakMap || !window.Promise) {
|
if (!window.WeakMap || !window.Promise || typeof globalThis === "undefined") {
|
||||||
window.unsupportedBrowser = true;
|
window.unsupportedBrowser = true;
|
||||||
} else {
|
} else {
|
||||||
// Some implementations of `WeakMap.prototype.has` do not accept false
|
// Some implementations of `WeakMap.prototype.has` do not accept false
|
||||||
|
|||||||
Reference in New Issue
Block a user