Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the latest version .. emit message error #1439

Closed
gagahjt opened this issue Mar 2, 2014 · 1 comment
Closed

Use the latest version .. emit message error #1439

gagahjt opened this issue Mar 2, 2014 · 1 comment

Comments

@gagahjt
Copy link

gagahjt commented Mar 2, 2014

MSIE 7.0 Socket.io.js ,In the first 7380 line:
// json data
if (null != obj.data) {
if (nsp) str += ',';
str += json.stringify(obj.data);
}

json.stringify undefined ...

socket.io can not receiving the message from the server (the server pushed)

thank u...

@gagahjt
Copy link
Author

gagahjt commented Mar 2, 2014

Solution:
Based on ECMAScript 5 standard JSON.stringify () method in ie7, ie6, is not supported.

json2 (https://github.com/douglascrockford/JSON-js/blob/master/json2.js)

When browser does not support JSON.stringify () method will automatically add the method.

@gagahjt gagahjt closed this as completed Mar 2, 2014
@gagahjt gagahjt reopened this Mar 2, 2014
@gagahjt gagahjt closed this as completed Mar 3, 2014
darrachequesne pushed a commit that referenced this issue Jul 4, 2024
Having type `Object` it was not possible to set values, e.g.:

```ts
if (!this.socket.io.opts.query) {
  this.socket.io.opts.query = {};
}
this.socket.io.opts.query.token = 'abc123';
```

Results in error:

> Element implicitly has an 'any' type because expression of type '"token"' can't be used to index type 'Object'.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant