jonschlinkert / kind-of

Get the native JavaScript type of a value, fast. Used by superstruct, micromatch and many others!
https://github.com/jonschlnkert
MIT License
347 stars 38 forks source link

Undefined check missing in 5.0.0/5.0.1 #13

Closed struct78 closed 6 years ago

struct78 commented 7 years ago

Hi,

This line requires an undefined check, the constructor's name property is undefined in IE11 and lower so it throws an exception when trying to call the slice method.

https://github.com/jonschlinkert/kind-of/blob/master/index.js#L32

jonschlinkert commented 7 years ago

want to do a pr?

struct78 commented 7 years ago

Done https://github.com/jonschlinkert/kind-of/pull/14

jonschlinkert commented 6 years ago

forgot to close this, thanks again