mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-22 00:16:15 -04:00
Merge pull request #2791 from fread/develop
Fix off-by-one: The chatHead is in fact a valid message index.
This commit is contained in:
commit
a09044a6f3
1 changed files with 2 additions and 2 deletions
|
@ -473,9 +473,9 @@ exports.getChatHistory = function(padID, start, end, callback)
|
||||||
end = pad.chatHead;
|
end = pad.chatHead;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(start >= chatHead && chatHead > 0)
|
if(start > chatHead)
|
||||||
{
|
{
|
||||||
callback(new customError("start is higher or equal to the current chatHead","apierror"));
|
callback(new customError("start is higher than the current chatHead","apierror"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(end > chatHead)
|
if(end > chatHead)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue