Skip to content

Commit bc79ac1

Browse files
committed
Merge pull request #2 from eacaps/bugfix/uninstallevent
Bugfix/uninstallevent
2 parents 2a210ce + 3d7866a commit bc79ac1

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

dist/actioncable/cable/Connection.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ var Connection = (function () {
9090
value: function isState() {
9191
var ref, states;
9292
states = 1 <= arguments.length ? slice.call(arguments, 0) : [];
93-
return (ref = this.getState(), indexOf.call(states, ref) >= 0);
93+
return ref = this.getState(), indexOf.call(states, ref) >= 0;
9494
}
9595
}, {
9696
key: "getState",
@@ -143,7 +143,7 @@ var Connection = (function () {
143143
var eventName, results;
144144
results = [];
145145
for (eventName in this.events) {
146-
results.push(this.webSocket.removeEventListener(eventName));
146+
results.push(this.webSocket.removeEventListener(eventName, this.events[eventName]));
147147
}
148148
return results;
149149
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "es6-actioncable",
3-
"version": "0.0.1",
3+
"version": "0.0.2",
44
"description": "Port of rails actioncable coffeescript to es6",
55
"main": "index.js",
66
"scripts": {

src/actioncable/cable/Connection.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ class Connection {
119119
var eventName, results;
120120
results = [];
121121
for (eventName in this.events) {
122-
results.push(this.webSocket.removeEventListener(eventName));
122+
results.push(this.webSocket.removeEventListener(eventName, this.events[eventName]));
123123
}
124124
return results;
125125
};
@@ -131,4 +131,4 @@ class Connection {
131131
};
132132
}
133133

134-
export default Connection;
134+
export default Connection;

0 commit comments

Comments
 (0)