Skip to content

Commit

Permalink
Merge pull request #15536 from NetForce1/patch-2
Browse files Browse the repository at this point in the history
[DOC release] Replace RSVP.cast with RSVP.resolve
  • Loading branch information
locks authored Aug 18, 2017
2 parents f7e1d18 + d006a79 commit 8f68cf0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/ember-runtime/lib/mixins/promise_proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function tap(proxy, promise) {
let ObjectPromiseProxy = Ember.ObjectProxy.extend(Ember.PromiseProxyMixin);
let proxy = ObjectPromiseProxy.create({
promise: Ember.RSVP.cast($.getJSON('/some/remote/data.json'))
promise: Ember.RSVP.resolve($.getJSON('/some/remote/data.json'))
});
proxy.then(function(json){
Expand All @@ -67,7 +67,7 @@ function tap(proxy, promise) {
When the $.getJSON completes, and the promise is fulfilled
with json, the life cycle attributes will update accordingly.
Note that $.getJSON doesn't return an ECMA specified promise,
it is useful to wrap this with an `RSVP.cast` so that it behaves
it is useful to wrap this with an `RSVP.resolve` so that it behaves
as a spec compliant promise.
```javascript
Expand Down

0 comments on commit 8f68cf0

Please sign in to comment.