Skip to content

Commit

Permalink
[DOC release] Replace RSVP.cast with RSVP.resolve
Browse files Browse the repository at this point in the history
cast is dead (see: #13984), and should be replaced with resolve
  • Loading branch information
NetForce1 authored Jul 21, 2017
1 parent 8e7443f commit d006a79
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 d006a79

Please sign in to comment.