{"action":"created","issue":{"url":"https://api.github.com/repos/rackt/react-router/issues/2257","labels_url":"https://api.github.com/repos/rackt/react-router/issues/2257/labels{/name}","comments_url":"https://api.github.com/repos/rackt/react-router/issues/2257/comments","events_url":"https://api.github.com/repos/rackt/react-router/issues/2257/events","html_url":"https://github.com/rackt/react-router/issues/2257","id":111234167,"number":2257,"title":"Uncaught TypeError in computeChangedRoutes module when using routerWillLeave hook.","user":{"login":"zettadam","id":516382,"avatar_url":"https://avatars.githubusercontent.com/u/516382?v=3","gravatar_id":"","url":"https://api.github.com/users/zettadam","html_url":"https://github.com/zettadam","followers_url":"https://api.github.com/users/zettadam/followers","following_url":"https://api.github.com/users/zettadam/following{/other_user}","gists_url":"https://api.github.com/users/zettadam/gists{/gist_id}","starred_url":"https://api.github.com/users/zettadam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zettadam/subscriptions","organizations_url":"https://api.github.com/users/zettadam/orgs","repos_url":"https://api.github.com/users/zettadam/repos","events_url":"https://api.github.com/users/zettadam/events{/privacy}","received_events_url":"https://api.github.com/users/zettadam/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rackt/react-router/labels/duplicate","name":"duplicate","color":"eb6420"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-10-13T17:54:52Z","updated_at":"2015-11-01T16:23:03Z","closed_at":"2015-10-13T21:24:40Z","body":"I'm using **1.0.0-rc3** release and I get this error (in `computeChangedRoutes.js` module) when using the `Lifecycle` mixin and `routerWillLeave` hook.\r\n\r\n```\r\nUncaught TypeError: Cannot read property 'search' of undefined\r\n```\r\n\r\nLooking at the debugger I see that `nextState` argument in `function routeQueryChanged(prevState, nextState)` does not contain `location` property. Consequently, I get a `TypeError`.\r\n\r\nThis is how I use it in my component: \r\n\r\n```javascript\r\nimport React from 'react';\r\nimport { Lifecycle } from 'react-router';\r\n\r\nconst MyRouteComponent = React.createClass( {\r\n  \r\n  mixins: [ Lifecycle ],\r\n  \r\n  routerWillLeave ( nextLocation ) {\r\n    return  'Are you sure you want to leave?';\r\n  },\r\n  \r\n  //...\r\n\r\n} );\r\n```"},"comment":{"url":"https://api.github.com/repos/rackt/react-router/issues/comments/152841441","html_url":"https://github.com/rackt/react-router/issues/2257#issuecomment-152841441","issue_url":"https://api.github.com/repos/rackt/react-router/issues/2257","id":152841441,"user":{"login":"adesmet","id":6897965,"avatar_url":"https://avatars.githubusercontent.com/u/6897965?v=3","gravatar_id":"","url":"https://api.github.com/users/adesmet","html_url":"https://github.com/adesmet","followers_url":"https://api.github.com/users/adesmet/followers","following_url":"https://api.github.com/users/adesmet/following{/other_user}","gists_url":"https://api.github.com/users/adesmet/gists{/gist_id}","starred_url":"https://api.github.com/users/adesmet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adesmet/subscriptions","organizations_url":"https://api.github.com/users/adesmet/orgs","repos_url":"https://api.github.com/users/adesmet/repos","events_url":"https://api.github.com/users/adesmet/events{/privacy}","received_events_url":"https://api.github.com/users/adesmet/received_events","type":"User","site_admin":false},"created_at":"2015-11-01T16:23:03Z","updated_at":"2015-11-01T16:23:03Z","body":"sounds good, any idea about the timeframe?"}}