Bluebird: fix Promise.try
This commit is contained in:
parent
e1fb322670
commit
a0c77549bd
12
bluebird.md
12
bluebird.md
|
@ -40,10 +40,14 @@ Promise.props({
|
||||||
### Chain of promises
|
### Chain of promises
|
||||||
|
|
||||||
```js
|
```js
|
||||||
Promise.try(function () {
|
function getPhotos() {
|
||||||
if (err) throw new Error("boo");
|
return Promise.try(function () {
|
||||||
return result;
|
if (err) throw new Error("boo");
|
||||||
});
|
return result;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
getPhotos().then(...)
|
||||||
```
|
```
|
||||||
|
|
||||||
### Working with node-style functions
|
### Working with node-style functions
|
||||||
|
|
Loading…
Reference in New Issue