Skip to content

Commit cb2c846

Browse files
authored
Fix mistake in kindOf.ts
In function miniKindOf: in other case, forget to invoke 'Object.prototype.toString' to get type
1 parent 05b8ec9 commit cb2c846

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils/kindOf.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export function miniKindOf(val: any): string {
3030
}
3131

3232
// other
33-
return type.slice(8, -1).toLowerCase().replace(/\s/g, '')
33+
return Object.prototype.toString.call(val).slice(8, -1).toLowerCase().replace(/\s/g, '')
3434
}
3535

3636
function ctorName(val: any): string | null {

0 commit comments

Comments
 (0)