patch issue in r46

This commit is contained in:
mappu 2017-02-05 19:09:08 +13:00
parent 3f077f15f0
commit 1cc6cd2b90
1 changed files with 7 additions and 8 deletions

View File

@ -498,16 +498,15 @@ var maybeWriterFor = function(username) {
};
var writerFor = function(username) {
var ret = maybeWriterFor(username);
if (ret === null) {
// create new
tabid = tab_new(next_tabid++, username);
pm_tabs[username] = tabid;
return write(tabid);
var ret = maybeWriterFor(username);
if (ret !== null) {
return ret; // found
}
return ret;
// create new
var tabid = tab_new(next_tabid++, username);
pm_tabs[username] = tabid;
return write(tabid);
};
/* */