Skip to content
Browse files

let's only add a message if we get a message

  • Loading branch information...
1 parent f948719 commit e4487169e90637ec4797c3d61335e7a4d97b2e6b @lyle committed Dec 13, 2013
Showing with 4 additions and 3 deletions.
  1. +4 −3 008b_yousay.js
View
7 008b_yousay.js
@@ -17,9 +17,10 @@ http.createServer(function (req, res) {
if(daQuery["fromName"]){
fromPerson = daQuery["fromName"].replace(/[\W\s\.-\?\!]/g,' ')
}
-
- console.log(fromPerson + " said:" + toSay)
- messages.push(fromPerson + " said:" + toSay)
+ if(toSay){
+ console.log(fromPerson + " said:" + toSay)
+ messages.push(fromPerson + " said:" + toSay)
+ }
req.on('end',function(){
if(toSay){

0 comments on commit e448716

Please sign in to comment.
Something went wrong with that request. Please try again.