Skip to content

Commit 3dccf62

Browse files
committed
Core: Remove special case try/catch in isPlainObject
Fixes #14746
1 parent 01c360f commit 3dccf62

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

src/core.js

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -225,16 +225,8 @@ jQuery.extend({
225225
return false;
226226
}
227227

228-
// Support: Firefox <20
229-
// The try/catch suppresses exceptions thrown when attempting to access
230-
// the "constructor" property of certain host objects, ie. |window.location|
231-
// https://bugzilla.mozilla.org/show_bug.cgi?id=814622
232-
try {
233-
if ( obj.constructor &&
234-
!hasOwn.call( obj.constructor.prototype, "isPrototypeOf" ) ) {
235-
return false;
236-
}
237-
} catch ( e ) {
228+
if ( obj.constructor &&
229+
!hasOwn.call( obj.constructor.prototype, "isPrototypeOf" ) ) {
238230
return false;
239231
}
240232

0 commit comments

Comments
 (0)