[LayaAir 2.0]代码无法编译

突然代码就无法编译了  也没看到那里出错 这个是什么原因 报错
The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten

QQ图片20200703210930.png

 
已邀请:

kylin9718

赞同来自:

1) 代码提示的意思是: “this”关键字相当于ES模块顶层的“undefined”,并且已被重写2) 原因是: 在最外层使用了this,在严格模式下,或者在es6环境下,顶层this被认定为undefined,会导致报错。
 
 

要回复问题请先

商务合作
商务合作