Skip to content

Commit

Permalink
Disable support for browsers that do not have fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronbushnell committed Jul 28, 2020
1 parent 0626af9 commit ee4829d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Release Notes for Visor

## 3.0.1 - 2020-07-27

### Fixed
- Remove support for browsers that do not have `fetch` (IE 11)

## 3.0.0 - 2020-07-27

> {warning} Visor 3 is a full rewrite of the plugin to play nicely with full-page static caching solutions like [Blitz](https://plugins.craftcms.com/blitz). Please ensure you are familiar with the [caveats to providing full-page static caching support](https://github.com/trendyminds/visor#caveats)
Expand Down
7 changes: 7 additions & 0 deletions resources/visor.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
(() => {
// If the browser does not support fetch, exit out (modern only!)
const fetchSupport = "fetch" in window;

if (!fetchSupport) {
return false;
}

fetch("/actions/visor/default/access")
.then((res) => {
// Did we encounter a non 200 status code? If so, exit
Expand Down
2 changes: 1 addition & 1 deletion src/resources/visor.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ee4829d

Please sign in to comment.