Skip to content

Commit

Permalink
FIX: Feature detect globalThis (#14410)
Browse files Browse the repository at this point in the history
* FIX: Feature detect globalThis

So browsers without support will receive a warning and browse our JS-less view.
  • Loading branch information
xfalcox committed Sep 22, 2021
1 parent 2e08591 commit a4cef67
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/assets/javascripts/browser-detect.js
@@ -1,4 +1,4 @@
if (!window.WeakMap || !window.Promise) {
if (!window.WeakMap || !window.Promise || typeof globalThis === "undefined") {
window.unsupportedBrowser = true;
} else {
// Some implementations of `WeakMap.prototype.has` do not accept false
Expand Down

0 comments on commit a4cef67

Please sign in to comment.