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: advance matching in the route create page causes the page to crash #2438

Closed
bzp2010 opened this issue Apr 23, 2022 · 1 comment · Fixed by #2440
Closed

bug: advance matching in the route create page causes the page to crash #2438

bzp2010 opened this issue Apr 23, 2022 · 1 comment · Fixed by #2440
Assignees
Labels
bug Something isn't working

Comments

@bzp2010
Copy link
Contributor

bzp2010 commented Apr 23, 2022

Issue description

When we create an advanced match rule in a route, the page will crash if the reverse setting is not adjusted.

Based on the occurrence conditions, it is presumed that the default value of the reverse field is not set correctly. At that point, executing toString on a null value will result in a JS error.

{
title: formatMessage({ id: 'page.route.reverse' }),
key: 'reverse',
render: (text: RouteModule.MatchingRule) => text.reverse.toString(),
},

Expected behavior

correct operation

How to Reproduce

  1. go to route create page
  2. create a advance matching rule that not change reverse field (don't click it)
  3. click confirm
  4. page crashed

Screenshots

No response

Environment

  • apisix-dashboard version, if have: 2.11.0

Additional context

No response

@bzp2010 bzp2010 added the bug Something isn't working label Apr 23, 2022
@bzp2010 bzp2010 changed the title bug: advance matching in the routing creation page causes the page to crash bug: advance matching in the route create page causes the page to crash Apr 23, 2022
@Si-ege
Copy link
Contributor

Si-ege commented Apr 24, 2022

I want to try to finish

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

Successfully merging a pull request may close this issue.

2 participants