Skip to content

Commit 506bc83

Browse files
SebC99flovilmart
authored andcommitted
Add a warning in 2.0.0.md about Promise.finally (#636)
1 parent 000c1fb commit 506bc83

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

2.0.0.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,3 +91,15 @@ Promise.all([promise1, promise2, promise3])
9191

9292
});
9393
```
94+
95+
:warning: Whereas `Parse.Promise.always`, `Promise.finally` callback don't receive any arguments, and don't resolve with a new argument to pass to the next promise in chain.
96+
97+
```js
98+
// before
99+
Parse.Promise.as(1).always((val) => val + 1).then((result) => console.log(result))
100+
// will print 2
101+
102+
// after
103+
Promise.resolve(1).finally(() => 2).then((result) => console.log(result))
104+
// will print 1
105+
```

0 commit comments

Comments
 (0)