patch issue in r46

This commit is contained in:
mappu 2017-02-05 19:09:08 +13:00
parent 3f077f15f0
commit 1cc6cd2b90

View File

@ -499,15 +499,14 @@ 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);
if (ret !== null) {
return ret; // found
}
return ret;
// create new
var tabid = tab_new(next_tabid++, username);
pm_tabs[username] = tabid;
return write(tabid);
};
/* */