{"action":"closed","issue":{"url":"https://api.github.com/repos/QuentinRoy/tie/issues/3","labels_url":"https://api.github.com/repos/QuentinRoy/tie/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/QuentinRoy/tie/issues/3/comments","events_url":"https://api.github.com/repos/QuentinRoy/tie/issues/3/events","html_url":"https://github.com/QuentinRoy/tie/issues/3","id":121437038,"number":3,"title":"onMayHaveChange may be called before dependent constraint","user":{"login":"QuentinRoy","id":728801,"avatar_url":"https://avatars.githubusercontent.com/u/728801?v=3","gravatar_id":"","url":"https://api.github.com/users/QuentinRoy","html_url":"https://github.com/QuentinRoy","followers_url":"https://api.github.com/users/QuentinRoy/followers","following_url":"https://api.github.com/users/QuentinRoy/following{/other_user}","gists_url":"https://api.github.com/users/QuentinRoy/gists{/gist_id}","starred_url":"https://api.github.com/users/QuentinRoy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/QuentinRoy/subscriptions","organizations_url":"https://api.github.com/users/QuentinRoy/orgs","repos_url":"https://api.github.com/users/QuentinRoy/repos","events_url":"https://api.github.com/users/QuentinRoy/events{/privacy}","received_events_url":"https://api.github.com/users/QuentinRoy/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/QuentinRoy/tie/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-12-10T09:24:11Z","updated_at":"2016-01-08T09:02:07Z","closed_at":"2016-01-08T09:02:07Z","body":"```javascript\r\nvar src = tie(0);\r\nvar dep = src.add(5);\r\ndep.get();\r\nvar handlerDepVal;\r\nsrc.onMayHaveChanged(function(){\r\n    handlerDepVal = dep.get();\r\n});\r\nsrc.set(10);\r\nconsole.log(handlerDepVal); // ->  5\r\nconsole.log(dep.get()); // -> 15\r\nsrc.set(20);\r\nconsole.log(handlerDepVal); // ->  15\r\nconsole.log(dep.get()); // -> 25\r\n// indeed, dep has not been notified yet that src has changed when the handler is called\r\n```"}}