cocos/example-projects

TypeError: Cannot read property 'WebSocket' of undefined on cocos creator 1.8.0

haxpor opened this issue · 2 comments

I encountered this problem after exporting the project, and run on 微信开发者工具 v1.02.1801081

screen shot 2018-01-12 at 9 05 41 am

It's a bug about the Wechat Dev Tool. You can modify the socket.io to workaround.

var global = ... return this; ...
// change to
var global = ... return window; ...

Thank you! It works now.