Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Suspicious usage of Map in ActionModule line 1205 #15388

Closed
dk2k opened this issue Aug 23, 2024 · 2 comments · Fixed by #15394
Closed

[BUG] Suspicious usage of Map in ActionModule line 1205 #15388

dk2k opened this issue Aug 23, 2024 · 2 comments · Fixed by #15394
Assignees
Labels
bug Something isn't working extensions Other

Comments

@dk2k
Copy link
Contributor

dk2k commented Aug 23, 2024

Describe the bug

Passed value has type Route, but declaration is Map<NamedRoute, RestSendToExtensionAction>
NamedRoute is subtype of Route
But there is at least one more subtype - ReplacedRoute
It's about type safety

Related component

Other

To Reproduce

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior

Additional Details

Plugins
Please list all plugins currently enabled.

Screenshots
If applicable, add screenshots to help explain your problem.

Host/Environment (please complete the following information):

  • OS: [e.g. iOS]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

@dk2k dk2k added bug Something isn't working untriaged labels Aug 23, 2024
@github-actions github-actions bot added the Other label Aug 23, 2024
@dbwiddis
Copy link
Member

Extensions should only be sending NamedRoute. I'll look into this and see if there's anywhere we can enforce that type.

@dbwiddis dbwiddis self-assigned this Aug 23, 2024
@dbwiddis
Copy link
Member

Interestingly, that method is never called anywhere (including tests).

Given that it's API I don't think we can change the argument type but should be easy to type check and return null if it's the wrong type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working extensions Other
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants