File tree 1 file changed +8
-5
lines changed
src/compiler/compile/render_dom/wrappers 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ import FragmentWrapper from './Fragment';
9
9
import { b , x } from 'code-red' ;
10
10
import { walk } from 'estree-walker' ;
11
11
import { is_head } from './shared/is_head' ;
12
- import { Identifier , Node } from 'estree' ;
12
+ import { Identifier , Node , UnaryExpression } from 'estree' ;
13
13
14
14
function is_else_if ( node : ElseBlock ) {
15
15
return (
@@ -591,14 +591,17 @@ export default class IfBlockWrapper extends Wrapper {
591
591
get_initial_dirty_bit ( ) {
592
592
const _this = this ;
593
593
// TODO: context-overflow make it less gross
594
-
595
- const val = x `-1` ;
594
+ const val : UnaryExpression = x `-1` as UnaryExpression ;
596
595
return {
597
- ...val ,
598
- elements : [ val ] ,
599
596
get type ( ) {
600
597
return _this . renderer . context_overflow ? 'ArrayExpression' : 'UnaryExpression' ;
601
598
} ,
599
+ // as [-1]
600
+ elements : [ val ] ,
601
+ // as -1
602
+ operator : val . operator ,
603
+ prefix : val . prefix ,
604
+ argument : val . argument ,
602
605
} ;
603
606
}
604
607
}
You can’t perform that action at this time.
0 commit comments