This repository was archived by the owner on May 15, 2026. It is now read-only.
Commit 10ac9ff
committed
fix: guard countMarkdownHeadings against non-string input
When returning from a subtask to the parent task, message.text can be a
non-string truthy value at runtime. The existing `if (!text)` guard only
catches falsy values, so `.replace()` throws TypeError on non-strings.
Add a `typeof text !== "string"` check to handle this defensively.
Fixes #118791 parent 0892455 commit 10ac9ff
2 files changed
Lines changed: 11 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
11 | 21 | | |
12 | 22 | | |
13 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
0 commit comments