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:
Rafael dos Santos Silva 2021-09-22 11:39:41 -03:00 committed by GitHub
parent 2e085915cc
commit a4cef67e14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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