{"action":"opened","issue":{"url":"https://api.github.com/repos/rackt/history/issues/227","repository_url":"https://api.github.com/repos/rackt/history","labels_url":"https://api.github.com/repos/rackt/history/issues/227/labels{/name}","comments_url":"https://api.github.com/repos/rackt/history/issues/227/comments","events_url":"https://api.github.com/repos/rackt/history/issues/227/events","html_url":"https://github.com/rackt/history/issues/227","id":132671666,"number":227,"title":"Async action in listenBefore in never ending loop","user":{"login":"svrcekmichal","id":9148702,"avatar_url":"https://avatars.githubusercontent.com/u/9148702?v=3","gravatar_id":"","url":"https://api.github.com/users/svrcekmichal","html_url":"https://github.com/svrcekmichal","followers_url":"https://api.github.com/users/svrcekmichal/followers","following_url":"https://api.github.com/users/svrcekmichal/following{/other_user}","gists_url":"https://api.github.com/users/svrcekmichal/gists{/gist_id}","starred_url":"https://api.github.com/users/svrcekmichal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/svrcekmichal/subscriptions","organizations_url":"https://api.github.com/users/svrcekmichal/orgs","repos_url":"https://api.github.com/users/svrcekmichal/repos","events_url":"https://api.github.com/users/svrcekmichal/events{/privacy}","received_events_url":"https://api.github.com/users/svrcekmichal/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-02-10T11:16:39Z","updated_at":"2016-02-10T11:16:39Z","closed_at":null,"body":"If i add some async action into listenBefore, it will enter never ending loop.\r\n\r\n```\r\nhistory.listenBefore((location,callback) => {\r\n    console.log('listenBefore => location', location);\r\n    setTimeout(() => {\r\n        callback();\r\n    },1000);\r\n});\r\n```\r\n\r\nconsole output:\r\n```\r\nlistenBefore => location Object {pathname: \"/\", search: \"\", hash: \"\", state: null, action: \"REPLACE\"…}\r\nlistenBefore => location Object {pathname: \"/\", search: \"\", hash: \"\", state: null, action: \"REPLACE\"…}\r\nlistenBefore => location Object {pathname: \"/\", search: \"\", hash: \"\", state: null, action: \"REPLACE\"…}\r\nlistenBefore => location Object {pathname: \"/\", search: \"\", hash: \"\", state: null, action: \"REPLACE\"…}\r\n...\r\n```\r\n\r\nIs it expected and I'm doing something wrong? "}}