File tree 2 files changed +11
-5
lines changed
src/generators/dom/visitors
test/runtime/samples/await-then-catch-if
2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ export default function visitAwaitBlock(
67
67
${ old_block } .u();
68
68
${ old_block } .d();
69
69
${ await_block } .c();
70
- ${ await_block } .m(${ anchor } .parentNode, ${ anchor } );
70
+ ${ await_block } .m(${ state . parentNode || ` ${ anchor } .parentNode` } , ${ anchor } );
71
71
}
72
72
}
73
73
@@ -142,6 +142,10 @@ export default function visitAwaitBlock(
142
142
` ) ;
143
143
}
144
144
145
+ block . builders . unmount . addBlock ( deindent `
146
+ ${ await_block } .u();
147
+ ` ) ;
148
+
145
149
block . builders . destroy . addBlock ( deindent `
146
150
${ await_token } = null;
147
151
${ await_block } .d();
Original file line number Diff line number Diff line change 1
1
let fulfil ;
2
2
3
- let thePromise = new Promise ( f => {
3
+ const thePromise = new Promise ( f => {
4
4
fulfil = f ;
5
5
} ) ;
6
6
@@ -35,9 +35,11 @@ export default {
35
35
show : true
36
36
} ) ;
37
37
38
- assert . htmlEqual ( target . innerHTML , `
39
- <p>the value is 42</p>
40
- ` ) ;
38
+ return thePromise . then ( ( ) => {
39
+ assert . htmlEqual ( target . innerHTML , `
40
+ <p>the value is 42</p>
41
+ ` ) ;
42
+ } ) ;
41
43
} ) ;
42
44
}
43
45
} ;
You can’t perform that action at this time.
0 commit comments