Skip to content

Commit daf7a6d

Browse files
authored
ref: Move creation of iframe in try/catch (getsentry#2447)
1 parent 2087eff commit daf7a6d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Unreleased
44

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

77
## 5.12.4
88

packages/utils/src/supports.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,9 @@ export function supportsNativeFetch(): boolean {
107107
let result = false;
108108
const doc = global.document;
109109
if (doc) {
110-
const sandbox = doc.createElement('iframe');
111-
sandbox.hidden = true;
112110
try {
111+
const sandbox = doc.createElement('iframe');
112+
sandbox.hidden = true;
113113
doc.head.appendChild(sandbox);
114114
if (sandbox.contentWindow && sandbox.contentWindow.fetch) {
115115
// tslint:disable-next-line:no-unbound-method

0 commit comments

Comments
 (0)