mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-23 08:56:17 -04:00
Don't crash if setText isn't passed any text. issue #861
This commit is contained in:
parent
9617ace809
commit
a7dd620b9f
1 changed files with 7 additions and 0 deletions
|
@ -154,6 +154,13 @@ Example returns:
|
|||
*/
|
||||
exports.setText = function(padID, text, callback)
|
||||
{
|
||||
//text is required
|
||||
if(typeof text != "string")
|
||||
{
|
||||
callback(new customError("text is no string","apierror"));
|
||||
return;
|
||||
}
|
||||
|
||||
//get the pad
|
||||
getPadSafe(padID, true, function(err, pad)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue