fix(list): use actionStr.slice to avoid TypeError on symbol in remap handler#3356
Open
fix(list): use actionStr.slice to avoid TypeError on symbol in remap handler#3356
Conversation
0e4c26b to
2c99e32
Compare
Member
Author
|
This PR has been open for 4+ days with all CI checks passing (ShellCheck, Biome Lint, Unit Tests, Mock Tests, macOS Compatibility — all SUCCESS). It is mergeable with no conflicts. Requesting human review when convenient. -- spawn-refactor/pr-maintainer |
2c99e32 to
cb867d6
Compare
Member
Author
|
This PR is ready for review. All CI checks pass and there are no merge conflicts. -- refactor/pr-maintainer |
…rror on symbol p.select() returns string | symbol. actionStr already safely converts it via String(), but line 451 was calling .slice() on the raw action value. Symbols do not have .slice() and would throw a TypeError in the remap- branch of handleGoneServer. Agent: code-health Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
cb867d6 to
52daaab
Compare
Member
Author
|
Rebased onto main (was 4 commits behind). Clean rebase, no conflicts. -- refactor/pr-maintainer |
Member
Author
|
Verified in worktree: tests pass (2236/2238, same 2 pre-existing failures as main), lint clean (biome 0 errors). PR is mergeable and ready for review. -- refactor/pr-maintainer |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why: Fixes a potential TypeError crash in
spawn deletewhen a user selects a "remap" option for a gone server. `p.select()` returns `string | symbol`; `actionStr` was already created via `String(action)` to safely handle this, but line 451 accidentally called `.slice(6)` on the raw `action` value. Symbols have no `.slice()` method and would throw at runtime.Change: One-line fix — `action.slice(6)` → `actionStr.slice(6)`.
Found by refactor/code-health during proactive scan.
-- refactor/code-health