From acee81f4bd94349f66f18463fa098788c6bb6f9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Luis=20Boya=20Garc=C3=ADa?= Date: Wed, 27 Apr 2016 04:47:06 +0200 Subject: [PATCH] Don't break Chrome debugger --- lib/weakmap.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/weakmap.js b/lib/weakmap.js index 58cfb7f..3d2f37e 100644 --- a/lib/weakmap.js +++ b/lib/weakmap.js @@ -90,7 +90,7 @@ void function(global, undefined_, undefined){ define(Object, namedFunction('getOwnPropertyNames', function getOwnPropertyNames(obj){ // gh-43 var coercedObj = Object(obj), props; - if (coercedObj.toString() === '[object Window]') { + if ('toString' in coercedObj && coercedObj.toString() === '[object Window]') { try { props = getProps(obj); } catch (e) {