Permalink
Browse files

添加默认值

  • Loading branch information...
1 parent e6d7b50 commit 9f2719299595c1fa2f7bd97f7b51dd4da924098b @zhike-smallwolf zhike-smallwolf committed Nov 18, 2015
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/module/DictTokenizer.js
@@ -275,7 +275,7 @@ var getPosInfo = function (words, text) {
* @return {array}
*/
var getChunks = function (wordpos, pos, text) {
- var words = wordpos[pos];
+ var words = wordpos[pos] || [];
// debug('getChunks: ');
// debug(words);
// throw new Error();

0 comments on commit 9f27192

Please sign in to comment.