{"action":"created","issue":{"url":"https://api.github.com/repos/AmpersandJS/ampersand-collection-rest-mixin/issues/13","labels_url":"https://api.github.com/repos/AmpersandJS/ampersand-collection-rest-mixin/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/AmpersandJS/ampersand-collection-rest-mixin/issues/13/comments","events_url":"https://api.github.com/repos/AmpersandJS/ampersand-collection-rest-mixin/issues/13/events","html_url":"https://github.com/AmpersandJS/ampersand-collection-rest-mixin/issues/13","id":53038258,"number":13,"title":"getOrFetch() should not mix asynchronous and synchronous callback","user":{"login":"bernharduw","id":740978,"avatar_url":"https://avatars.githubusercontent.com/u/740978?v=3","gravatar_id":"","url":"https://api.github.com/users/bernharduw","html_url":"https://github.com/bernharduw","followers_url":"https://api.github.com/users/bernharduw/followers","following_url":"https://api.github.com/users/bernharduw/following{/other_user}","gists_url":"https://api.github.com/users/bernharduw/gists{/gist_id}","starred_url":"https://api.github.com/users/bernharduw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bernharduw/subscriptions","organizations_url":"https://api.github.com/users/bernharduw/orgs","repos_url":"https://api.github.com/users/bernharduw/repos","events_url":"https://api.github.com/users/bernharduw/events{/privacy}","received_events_url":"https://api.github.com/users/bernharduw/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/AmpersandJS/ampersand-collection-rest-mixin/labels/bug","name":"bug","color":"e11d21"},{"url":"https://api.github.com/repos/AmpersandJS/ampersand-collection-rest-mixin/labels/discussion","name":"discussion","color":"d4c5f9"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2014-12-29T12:31:55Z","updated_at":"2015-01-05T17:07:05Z","closed_at":null,"body":"When the model is not in the collection, the callback is called asynchronously when the fetch result returns. But when the model is already in the collection, `getOrFetch()` calls the callback in the same tick. The callback should be put into the event queue with `setTimeout(cb, 0)` or similar."},"comment":{"url":"https://api.github.com/repos/AmpersandJS/ampersand-collection-rest-mixin/issues/comments/68739347","html_url":"https://github.com/AmpersandJS/ampersand-collection-rest-mixin/issues/13#issuecomment-68739347","issue_url":"https://api.github.com/repos/AmpersandJS/ampersand-collection-rest-mixin/issues/13","id":68739347,"user":{"login":"wraithgar","id":36607,"avatar_url":"https://avatars.githubusercontent.com/u/36607?v=3","gravatar_id":"","url":"https://api.github.com/users/wraithgar","html_url":"https://github.com/wraithgar","followers_url":"https://api.github.com/users/wraithgar/followers","following_url":"https://api.github.com/users/wraithgar/following{/other_user}","gists_url":"https://api.github.com/users/wraithgar/gists{/gist_id}","starred_url":"https://api.github.com/users/wraithgar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wraithgar/subscriptions","organizations_url":"https://api.github.com/users/wraithgar/orgs","repos_url":"https://api.github.com/users/wraithgar/repos","events_url":"https://api.github.com/users/wraithgar/events{/privacy}","received_events_url":"https://api.github.com/users/wraithgar/received_events","type":"User","site_admin":false},"created_at":"2015-01-05T17:07:05Z","updated_at":"2015-01-05T17:07:05Z","body":"+1"}}