{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angular/issues/6068","labels_url":"https://api.github.com/repos/angular/angular/issues/6068/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular/issues/6068/comments","events_url":"https://api.github.com/repos/angular/angular/issues/6068/events","html_url":"https://github.com/angular/angular/issues/6068","id":123394846,"number":6068,"title":"$q Promise API chaining behavior","user":{"login":"phsstory","id":11877226,"avatar_url":"https://avatars.githubusercontent.com/u/11877226?v=3","gravatar_id":"","url":"https://api.github.com/users/phsstory","html_url":"https://github.com/phsstory","followers_url":"https://api.github.com/users/phsstory/followers","following_url":"https://api.github.com/users/phsstory/following{/other_user}","gists_url":"https://api.github.com/users/phsstory/gists{/gist_id}","starred_url":"https://api.github.com/users/phsstory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phsstory/subscriptions","organizations_url":"https://api.github.com/users/phsstory/orgs","repos_url":"https://api.github.com/users/phsstory/repos","events_url":"https://api.github.com/users/phsstory/events{/privacy}","received_events_url":"https://api.github.com/users/phsstory/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-22T01:50:12Z","updated_at":"2015-12-22T02:06:50Z","closed_at":"2015-12-22T02:06:50Z","body":"I may or may not be reading the spec https://promisesaplus.com/#point-64 2.3.4 correctly, but I my interpretation suggests these is a bug in the chaining logic.\r\n\r\n2.3.4 suggests that in a chain, if the resolved or rejected callback do not return a value, the next in the chain should be resolved or rejected with the original value in turn.\r\n\r\nPlease see http://plnkr.co/edit/9Di1pjjcPdTZI7FsXID3?p=preview as an example\r\n\r\nThe only other option i see is the undefined behavior state in the spec involving 2.2.7.1 where neither onFilfilled nor onRejected returns a value, but in such a situation, I feel the specificity of 2.3.4 supersedes the undefined behavior.\r\n\r\nIf this ticket is deemed not a bug, I would suggest updating the docs to mention that all onFulfilled or onRejected callbacks should, at the least, return the original result"},"comment":{"url":"https://api.github.com/repos/angular/angular/issues/comments/166478974","html_url":"https://github.com/angular/angular/issues/6068#issuecomment-166478974","issue_url":"https://api.github.com/repos/angular/angular/issues/6068","id":166478974,"user":{"login":"robwormald","id":534930,"avatar_url":"https://avatars.githubusercontent.com/u/534930?v=3","gravatar_id":"","url":"https://api.github.com/users/robwormald","html_url":"https://github.com/robwormald","followers_url":"https://api.github.com/users/robwormald/followers","following_url":"https://api.github.com/users/robwormald/following{/other_user}","gists_url":"https://api.github.com/users/robwormald/gists{/gist_id}","starred_url":"https://api.github.com/users/robwormald/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robwormald/subscriptions","organizations_url":"https://api.github.com/users/robwormald/orgs","repos_url":"https://api.github.com/users/robwormald/repos","events_url":"https://api.github.com/users/robwormald/events{/privacy}","received_events_url":"https://api.github.com/users/robwormald/received_events","type":"User","site_admin":false},"created_at":"2015-12-22T02:06:50Z","updated_at":"2015-12-22T02:06:50Z","body":"@phsstory this is the angular2 repo, you want https://github.com/angular/angular.js :+1: "}}