mirror of
https://github.com/jech/galene.git
synced 2024-11-22 16:45:58 +01:00
Reset c.sc after calling onclose.
The onclose callback might want to access c.sc.
This commit is contained in:
parent
892a4b8401
commit
cc2ed14484
1 changed files with 2 additions and 1 deletions
|
@ -1216,10 +1216,11 @@ Stream.prototype.close = function(replace) {
|
||||||
let changed = recomputeUserStreams(c.sc, userid);
|
let changed = recomputeUserStreams(c.sc, userid);
|
||||||
if(changed && c.sc.onuser)
|
if(changed && c.sc.onuser)
|
||||||
c.sc.onuser.call(c.sc, userid, "change");
|
c.sc.onuser.call(c.sc, userid, "change");
|
||||||
c.sc = null;
|
|
||||||
|
|
||||||
if(c.onclose)
|
if(c.onclose)
|
||||||
c.onclose.call(c, replace);
|
c.onclose.call(c, replace);
|
||||||
|
|
||||||
|
c.sc = null;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue