Skip to content

Commit

Permalink
Revert "Detect if DOMException exists via typeof instead of trying to…
Browse files Browse the repository at this point in the history
… call it and catching the exception which may get thrown"

This reverts commit e329852.
  • Loading branch information
JakeChampion committed Jul 30, 2020
1 parent 259dc6a commit 0ebc095
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions fetch.js
Expand Up @@ -462,8 +462,9 @@ Response.redirect = function(url, status) {
}

export var DOMException = global.DOMException

if (typeof DOMException !== 'function') {
try {
new DOMException()
} catch (err) {
DOMException = function(message, name) {
this.message = message
this.name = name
Expand Down

0 comments on commit 0ebc095

Please sign in to comment.