File tree 4 files changed +56
-1
lines changed
tests/fixture/issues/8717
4 files changed +56
-1
lines changed Original file line number Diff line number Diff line change @@ -132,7 +132,10 @@ impl Pure<'_> {
132
132
return ;
133
133
}
134
134
135
- if self . options . unsafe_passes && & * method_name. sym == "toString" && arr. elems . len ( ) == 1
135
+ if self . options . unsafe_passes
136
+ && & * method_name. sym == "toString"
137
+ && arr. elems . len ( ) == 1
138
+ && arr. elems [ 0 ] . is_some ( )
136
139
{
137
140
report_change ! ( "evaluate: Reducing array.toString() call" ) ;
138
141
self . changed = true ;
Original file line number Diff line number Diff line change
1
+ {
2
+ "defaults" : true ,
3
+ "arguments" : false ,
4
+ "arrows" : true ,
5
+ "booleans" : true ,
6
+ "booleans_as_integers" : false ,
7
+ "collapse_vars" : true ,
8
+ "comparisons" : true ,
9
+ "computed_props" : true ,
10
+ "conditionals" : true ,
11
+ "dead_code" : true ,
12
+ "directives" : true ,
13
+ "drop_console" : false ,
14
+ "drop_debugger" : true ,
15
+ "evaluate" : true ,
16
+ "expression" : false ,
17
+ "hoist_funs" : false ,
18
+ "hoist_props" : true ,
19
+ "hoist_vars" : false ,
20
+ "if_return" : true ,
21
+ "join_vars" : true ,
22
+ "keep_classnames" : false ,
23
+ "keep_fargs" : true ,
24
+ "keep_fnames" : false ,
25
+ "keep_infinity" : false ,
26
+ "loops" : true ,
27
+ "negate_iife" : true ,
28
+ "properties" : true ,
29
+ "reduce_funcs" : false ,
30
+ "reduce_vars" : false ,
31
+ "side_effects" : true ,
32
+ "switches" : true ,
33
+ "typeofs" : true ,
34
+ "unsafe" : true ,
35
+ "unsafe_arrows" : false ,
36
+ "unsafe_comps" : false ,
37
+ "unsafe_Function" : false ,
38
+ "unsafe_math" : false ,
39
+ "unsafe_symbols" : false ,
40
+ "unsafe_methods" : false ,
41
+ "unsafe_proto" : false ,
42
+ "unsafe_regexp" : false ,
43
+ "unsafe_undefined" : false ,
44
+ "unused" : true ,
45
+ "const_to_let" : true ,
46
+ "pristine_globals" : true ,
47
+ "passes" : 3
48
+ }
Original file line number Diff line number Diff line change
1
+ console . log ( [ , ] . toString ( ) ) ;
Original file line number Diff line number Diff line change
1
+ console . log ( [
2
+ ,
3
+ ] . toString ( ) ) ;
You can’t perform that action at this time.
0 commit comments