From 74bafa34c37708e97b6b14a701c807f09240bb55 Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Fri, 16 Feb 2018 01:27:35 -0800 Subject: [PATCH] Fix isInstance() in IE11 Confirm that function.name is not undefined --- index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 0327f29..bedaa69 100644 --- a/index.js +++ b/index.js @@ -1768,7 +1768,8 @@ function blitBuffer (src, dst, offset, length) { // See: https://github.com/feross/buffer/issues/166 function isInstance (obj, type) { return obj instanceof type || - (obj != null && obj.constructor != null && obj.constructor.name === type.name) + (obj != null && obj.constructor != null && obj.constructor.name != null && + obj.constructor.name === type.name) } function numberIsNaN (obj) { // For IE11 support -- 2.34.1