{"action":"created","issue":{"url":"https://api.github.com/repos/router5/router5/issues/114","repository_url":"https://api.github.com/repos/router5/router5","labels_url":"https://api.github.com/repos/router5/router5/issues/114/labels{/name}","comments_url":"https://api.github.com/repos/router5/router5/issues/114/comments","events_url":"https://api.github.com/repos/router5/router5/issues/114/events","html_url":"https://github.com/router5/router5/issues/114","id":206897386,"number":114,"title":"strictQueryParams doesn't seem to be working","user":{"login":"coulson84","id":1502429,"avatar_url":"https://avatars3.githubusercontent.com/u/1502429?v=4","gravatar_id":"","url":"https://api.github.com/users/coulson84","html_url":"https://github.com/coulson84","followers_url":"https://api.github.com/users/coulson84/followers","following_url":"https://api.github.com/users/coulson84/following{/other_user}","gists_url":"https://api.github.com/users/coulson84/gists{/gist_id}","starred_url":"https://api.github.com/users/coulson84/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coulson84/subscriptions","organizations_url":"https://api.github.com/users/coulson84/orgs","repos_url":"https://api.github.com/users/coulson84/repos","events_url":"https://api.github.com/users/coulson84/events{/privacy}","received_events_url":"https://api.github.com/users/coulson84/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-02-10T20:22:39Z","updated_at":"2018-02-09T23:44:04Z","closed_at":"2017-02-22T13:48:09Z","author_association":"NONE","body":"Hopefully this is just caused by my doing something incorrectly but essentially I have code like this to set up the router\r\n\r\n`\r\n    const router = createRouter(routes, {\r\n        defaultRoute: 'page404',\r\n        trailingSlash: true,\r\n        strictQueryParams: false\r\n    })\r\n`\r\n\r\nso as according to the documentation this means that I should be able to add any query parameters to a url and it should still match as long as the path is correct. However if I run this on the server it will return a route not found error and if I load up the root of the app and then in the console run\r\n\r\n`router.matchPath('/?s=3')`\r\n\r\nit will return null.\r\n\r\nIf this isn't a bug then any guidance on what I am doing wrong would be great.\r\n\r\nThanks\r\nJoe"},"comment":{"url":"https://api.github.com/repos/router5/router5/issues/comments/364601285","html_url":"https://github.com/router5/router5/issues/114#issuecomment-364601285","issue_url":"https://api.github.com/repos/router5/router5/issues/114","id":364601285,"user":{"login":"ibc","id":16191,"avatar_url":"https://avatars2.githubusercontent.com/u/16191?v=4","gravatar_id":"","url":"https://api.github.com/users/ibc","html_url":"https://github.com/ibc","followers_url":"https://api.github.com/users/ibc/followers","following_url":"https://api.github.com/users/ibc/following{/other_user}","gists_url":"https://api.github.com/users/ibc/gists{/gist_id}","starred_url":"https://api.github.com/users/ibc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ibc/subscriptions","organizations_url":"https://api.github.com/users/ibc/orgs","repos_url":"https://api.github.com/users/ibc/repos","events_url":"https://api.github.com/users/ibc/events{/privacy}","received_events_url":"https://api.github.com/users/ibc/received_events","type":"User","site_admin":false},"created_at":"2018-02-09T23:44:04Z","updated_at":"2018-02-09T23:44:04Z","author_association":"NONE","body":"Routes:\r\n\r\n```js\r\n{\r\n  name : 'company',\r\n  path   : '/:company'\r\n}\r\n```\r\n\r\nSettings:\r\n\r\n```\r\ntrailingSlash     : true,\r\nuseTrailingSlash  : true,\r\nstrictQueryParams : false\r\n```\r\n\r\n```js\r\nrouter.matchPath('/google')\r\n// => matches company\r\n\r\nrouter.matchPath('/google?foo=bar')\r\n// => matches company\r\n\r\nrouter.matchPath('/google/')\r\n// => matches company\r\n\r\nrouter.matchPath('/google/?foo=bar')\r\n// => null\r\n```\r\n\r\n100% related to #248. There is a bug in the URL parsing.\r\n\r\nBut, this is much worse since when the initial URL opened in the browser already contains a `?foo=bar` query parameter, the router does not match the \"company\" route at all, no matter it's `/google?foo=bar` or `/google/?foo=bar`. This is with `useHash: false`. When `true` it behaves differently (not 100% ok anyway): https://github.com/router5/router5/issues/248#issuecomment-364599357"}}
{"actor":{"display_login":"ibc"}}