Skip to content

Commit

Permalink
Fix mistake in kindOf.ts
Browse files Browse the repository at this point in the history
In function miniKindOf: in other case, forget to invoke 'Object.prototype.toString' to get type
  • Loading branch information
anfengchen authored Sep 14, 2021
1 parent 05b8ec9 commit cb2c846
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/kindOf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export function miniKindOf(val: any): string {
}

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

function ctorName(val: any): string | null {
Expand Down

0 comments on commit cb2c846

Please sign in to comment.