Skip to content

Commit

Permalink
ref: Move creation of iframe in try/catch
Browse files Browse the repository at this point in the history
  • Loading branch information
HazAT committed Feb 21, 2020
1 parent 9f04983 commit 132eb62
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Unreleased

- tbd
- [utils] ref: Move creation of iframe in try/catch

## 5.12.4

Expand Down
4 changes: 2 additions & 2 deletions packages/utils/src/supports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ export function supportsNativeFetch(): boolean {
let result = false;
const doc = global.document;
if (doc) {
const sandbox = doc.createElement('iframe');
sandbox.hidden = true;
try {
const sandbox = doc.createElement('iframe');
sandbox.hidden = true;
doc.head.appendChild(sandbox);
if (sandbox.contentWindow && sandbox.contentWindow.fetch) {
// tslint:disable-next-line:no-unbound-method
Expand Down

0 comments on commit 132eb62

Please sign in to comment.