File tree 4 files changed +7
-6
lines changed
4 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,7 @@ These are only breaking changes for unformatted code.
61
61
- Fix issue with overlapping labelled argument with default value https://github.com/rescript-lang/rescript-compiler/pull/5989
62
62
- Fix issue with using alias and default value together https://github.com/rescript-lang/rescript-compiler/pull/5989
63
63
- GenType: fix issue with V3 compatibility mode (see https://github.com/rescript-lang/rescript-compiler/issues/5990 ) https://github.com/rescript-lang/rescript-compiler/pull/5991
64
+ - Fix issue in ` Js.Promise2 ` where ` then ` and ` catch ` were returning ` undefined ` https://github.com/rescript-lang/rescript-compiler/pull/5997
64
65
65
66
#### :nail_care : Polish
66
67
Original file line number Diff line number Diff line change @@ -4,14 +4,14 @@ type error
4
4
/** Type-safe t-first then */
5
5
let then: (promise<'a>, 'a => promise<'b>) => promise<'b> = %raw(`
6
6
function(p, cont) {
7
- Promise.resolve(p).then(cont)
7
+ return Promise.resolve(p).then(cont)
8
8
}
9
9
`)
10
10
11
11
/** Type-safe t-first catch */
12
12
let catch: (promise<'a>, error => promise<'a>) => promise<'a> = %raw(`
13
13
function(p, cont) {
14
- Promise.resolve(p).catch(cont)
14
+ return Promise.resolve(p).catch(cont)
15
15
}
16
16
`)
17
17
Original file line number Diff line number Diff line change 2
2
3
3
4
4
var then = ( function ( p , cont ) {
5
- Promise . resolve ( p ) . then ( cont )
5
+ return Promise . resolve ( p ) . then ( cont )
6
6
} ) ;
7
7
8
8
var $$catch = ( function ( p , cont ) {
9
- Promise . resolve ( p ) . catch ( cont )
9
+ return Promise . resolve ( p ) . catch ( cont )
10
10
} ) ;
11
11
12
12
export {
Original file line number Diff line number Diff line change 2
2
3
3
4
4
var then = ( function ( p , cont ) {
5
- Promise . resolve ( p ) . then ( cont )
5
+ return Promise . resolve ( p ) . then ( cont )
6
6
} ) ;
7
7
8
8
var $$catch = ( function ( p , cont ) {
9
- Promise . resolve ( p ) . catch ( cont )
9
+ return Promise . resolve ( p ) . catch ( cont )
10
10
} ) ;
11
11
12
12
exports . then = then ;
You can’t perform that action at this time.
0 commit comments