Skip to content

Commit 9cd862a

Browse files
committed
- fix bug: disconnect handler doesn't correctly clean up internal variables
- bump version
1 parent 23134b7 commit 9cd862a

File tree

6 files changed

+12
-6
lines changed

6 files changed

+12
-6
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Change Logs
22

3+
## v0.0.6
4+
5+
- fix bug: disconnect handler doesn't correctly clean up internal variables
6+
7+
38
## v0.0.5
49

510
- again add missing dependency `ws` for server side usage

dist/sdb-client.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
(function(){
22
ews.sdbClient = function(opt){
3+
var this$ = this;
34
opt == null && (opt = {});
45
import$(this, {
56
_evthdr: {},
67
_connection: null,
78
_ws: opt.ws
89
});
910
this._ws.addEventListener('close', function(){
10-
return this._connection = null, this._sws = null, this;
11+
return this$._connection = null, this$._sws = null, this$;
1112
});
1213
return this;
1314
};

dist/sdb-client.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@plotdb/ews",
3-
"version": "0.0.5",
3+
"version": "0.0.6",
44
"description": "elastic websocket",
55
"main": "dist/index.min.js",
66
"browser": "dist/index.min.js",

src/sdb-client.ls

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ ews.sdb-client = (opt = {}) ->
33
_evthdr: {}
44
_connection: null # sharedb connection object
55
_ws: opt.ws
6-
@_ws.addEventListener \close, -> @ <<< _connection: null, _sws: null
6+
@_ws.addEventListener \close, ~> @ <<< _connection: null, _sws: null
77
@
88

99
ews.sdb-client.prototype = Object.create(Object.prototype) <<< do

0 commit comments

Comments
 (0)