beamer icon indicating copy to clipboard operation
beamer copied to clipboard

BeamGuards doesn't have full information of the target url

Open khaiql opened this issue 2 years ago • 0 comments

Describe the bug I'm trying to do some redirect from the old url to the new url with BeamGuards, for example:

  • Old: /owner-store?userId=:userId
  • Redirect to: /store/:userId
        BeamGuard(
          pathPatterns: [RegExp('/owner-store')],
          check: (context, location) => false,
          beamToNamed: (origin, target) {
            final state = (target.state as BeamState);
            return '/store/${state.queryParameters['userId']}';
          },
        ),

the target state never has full information of the URI, and queryParameters returns an empty map

Beamer version:: 1.5.3

Expected behavior The state of the target should have all information of the URI, including query params

khaiql avatar Jan 11 '23 12:01 khaiql