Skip to content

Commit

Permalink
Fixed #23, extend(default, more.hasOwnProperty is not function)
Browse files Browse the repository at this point in the history
  • Loading branch information
hotoo committed Mar 24, 2014
1 parent 4877228 commit 62c614f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pinyin",
"version": "2.2.0",
"name": "pinyinjs",
"version": "2.2.1",
"description": "汉语拼音转换工具。",
"main": "src/pinyin.js",
"bin": {
Expand Down
3 changes: 1 addition & 2 deletions src/pinyin.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ function single_pinyin(han, options){
return single_pinyin(han.charAt(0), options);
}

options = extend(DEFAULT_OPTIONS, options);
var hanCode = han.charCodeAt(0);

if(!PINYIN_DICT[hanCode]){return [han];}
Expand Down Expand Up @@ -155,7 +154,7 @@ function pinyin(hans, options){

if("string" !== typeof hans){return [];}

options = extend(DEFAULT_OPTIONS, options);
options = extend(DEFAULT_OPTIONS, options || {});

var phrases = segment.doSegment(hans);
var len = hans.length;
Expand Down

0 comments on commit 62c614f

Please sign in to comment.