diff --git a/lib/reds.js b/lib/reds.js index 3ed33c0..2c024d1 100644 --- a/lib/reds.js +++ b/lib/reds.js @@ -80,7 +80,18 @@ exports.createSearch = function(key){ */ exports.words = function(str){ - return String(str).match(/\w+/g); + var words = String(str).match(/\w+/g); + if(words == null ){ + words = []; + } + var i =0; + var tempWord = ""; + for(;i255){ + words.push(str[i]); + } + } + return words; }; /**