Skip to content

Commit

Permalink
:shipit: Release 1.0.0: Don't parse json.data and json.data.data.
Browse files Browse the repository at this point in the history
  • Loading branch information
vibhavp committed Dec 12, 2015
1 parent 7d38aaf commit b76f3f5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wsevent.js",
"version": "0.0.4",
"version": "1.0.0",
"homepage": "https://github.com/TF2Stadium/wsevent.js",
"authors": [
"Vibhav Pant <[email protected]>"
Expand Down
4 changes: 2 additions & 2 deletions wsevent.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,15 +129,15 @@
callback = self.replyHandlers[id];

if (callback) {
callback(JSON.parse(json.data));
callback((json.data));
delete self.replyHandlers[id];
}
} else {
var name = extractor(json.data);

// Note: messages from the server are an extra layer deep
// (so .data.data instead of the single .data of responses)
var data = JSON.parse(json.data.data);
var data = (json.data.data);
self.onmessage(name, data);

callback = self.eventHandlers[name];
Expand Down

0 comments on commit b76f3f5

Please sign in to comment.