Commit 596e8d8
committed
fix(leaderboard): 日志区分 null 和 object,避免 typeof null 误导
Copilot CR (PR #328)
JS 历史包袱:typeof null === "object"。之前 fallback 兜底分支日志写
"kind=object",遇到既有内容是 null 时排查者会误以为是个普通对象,绕半天。
单独识别 null,日志输出 kind=null。
实测三种情况日志输出:
- null → kind=null
- {...} → kind=object
- "str" → kind=string1 parent b20ea9a commit 596e8d8
1 file changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
185 | 185 | | |
186 | 186 | | |
187 | 187 | | |
| 188 | + | |
| 189 | + | |
188 | 190 | | |
189 | | - | |
| 191 | + | |
190 | 192 | | |
191 | 193 | | |
192 | 194 | | |
| |||
0 commit comments