Skip to content

go() query string repetition bug #93

@drone1

Description

@drone1

I'm having an issue:

  • Give an expressive description of what is went wrong

Before I realized I can just call FlowRouter.setQueryParam(), I was running code that repeatedly (in my case, each time I would click a button), results in the query string param 'test' being repeated on the URL:

const route = FlowRouter.current()
const qs = {...route.queryParams} // clone
qs.test = 1
FlowRouter.go(
    route.path,
    {...route.params},	// clone
    qs
)

Shouldn't this be like calling setQueryParam()? Instead it results in the current path etc but adds ?test=1?test=1?test=1... to the URL. I would expect /path?test=1

  • Version of flow-router-extra you're experiencing this issue

3.7.5

  • Version of Meteor you're experiencing this issue

2.0

  • Browser name and its version (Chrome, Firefox, Safari, etc.)?

Chrome Version 96.0.4664.110 (Official Build) (64-bit)

  • Platform name and its version (Win, Mac, Linux)?
    Windows 10 20H2

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions