Skip to content

Commit dc6bea5

Browse files
committed
only need to check typeof val.constructor
1 parent 1df992c commit dc6bea5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ module.exports = function kindOf(val) {
6666
};
6767

6868
function ctorName(val) {
69-
return val.constructor && typeof val.constructor === 'function' ? val.constructor.name : null;
69+
return typeof val.constructor === 'function' ? val.constructor.name : null;
7070
}
7171

7272
function isArray(val) {

0 commit comments

Comments
 (0)