@@ -17,8 +17,6 @@ use crate::{
1717 rewrite:: Rewrite ,
1818} ;
1919
20- // const STRICTCHECKER: &str = "(function(a){arguments[0]=false;return a})(true)";
21- const STRICTCHECKER : & str = "(function(){return!this;})()" ;
2220
2321macro_rules! change {
2422 ( $span: expr, $( $ty: tt) * ) => {
@@ -31,7 +29,7 @@ pub(crate) use change;
3129pub enum JsChangeType < ' alloc : ' data , ' data > {
3230 /// insert `${cfg.wrapfn}(`
3331 WrapFnLeft { enclose : bool } ,
34- /// insert `,strictchecker )`
32+ /// insert `)`
3533 WrapFnRight { enclose : bool } ,
3634
3735 WrapGetLeft {
@@ -107,6 +105,7 @@ impl<'alloc: 'data, 'data> Transform<'data> for JsChange<'alloc, 'data> {
107105 ( cfg, flags) : & Self :: ToLowLevelData ,
108106 offset : i32 ,
109107 ) -> TransformLL < ' data > {
108+ dbg ! ( & self ) ;
110109 use JsChangeType as Ty ;
111110 use TransformLL as LL ;
112111 match self . ty {
@@ -116,9 +115,9 @@ impl<'alloc: 'data, 'data> Transform<'data> for JsChange<'alloc, 'data> {
116115 transforms ! [ & cfg. wrapfn, "(" ]
117116 } ) ,
118117 Ty :: WrapFnRight { enclose } => LL :: insert ( if enclose {
119- transforms ! [ "," , STRICTCHECKER , " ))"]
118+ transforms ! [ "))" ]
120119 } else {
121- transforms ! [ "," , STRICTCHECKER , " )"]
120+ transforms ! [ ")" ]
122121 } ) ,
123122 Ty :: WrapGetLeft {
124123 ident,
0 commit comments