Merge pull request #863 from jhollinger/develop
Don't crash server if setText was given no text
This commit is contained in:
commit
72532fadc9
|
@ -154,6 +154,13 @@ Example returns:
|
||||||
*/
|
*/
|
||||||
exports.setText = function(padID, text, callback)
|
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
|
//get the pad
|
||||||
getPadSafe(padID, true, function(err, pad)
|
getPadSafe(padID, true, function(err, pad)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue