因为idea格式化代码每次都会帮我去掉分号,然后就习惯不写分号了,然后就踩坑了。
如图这种写法的时候不加分号会引起报错:
Unhandled promise rejection TypeError: Cannot set property 'undefined' of undefined
因为idea格式化代码每次都会帮我去掉分号,然后就习惯不写分号了,然后就踩坑了。
如图这种写法的时候不加分号会引起报错:
Unhandled promise rejection TypeError: Cannot set property 'undefined' of undefined