Commit 7f77fc0
committed
fix: isObject should return false for functions
The `isObject` function incorrectly returned `true` for function values
because it checked `typeof value === 'function'` in addition to
`typeof value === 'object'`. The README documentation explicitly states
that functions should return false, but the implementation contradicted
this.
Fixes #25151 parent 2e1a5c2 commit 7f77fc0
2 files changed
Lines changed: 5 additions & 1 deletion
File tree
- src/decorator/typechecker
- test/functional
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3166 | 3166 | | |
3167 | 3167 | | |
3168 | 3168 | | |
| 3169 | + | |
| 3170 | + | |
| 3171 | + | |
| 3172 | + | |
3169 | 3173 | | |
3170 | 3174 | | |
3171 | 3175 | | |
| |||
0 commit comments