Skip to content
Permalink
Browse files

Merge pull request #57 from nieldlr/bug/better-type-checking

Bug/better type checking
  • Loading branch information...
nieldlr committed Feb 24, 2019
2 parents 99abbb0 + a63b2c2 commit 8b80e6d85130c9412117dbc41802cf6add3a74a3
Showing with 4 additions and 3 deletions.
  1. +2 −1 changelog.txt
  2. +1 −1 lib/dictionary.js
  3. +1 −1 package.json
@@ -29,4 +29,5 @@ v2.1.0 - React-native under the hood fix. Thanks to zurawiki.
v2.1.1 - Fix bug where 参 failed to lookup in dictionary.
v2.1.2 - Fix bug where 了 failed to return all the correct dictionary entries.
v2.1.3 - Small internal change to keep Hanzi node 4 compatible
v2.1.4 - Fixes a small boundary issue in how word frequency categories were calculated. Thanks mkmoisen!
v2.1.4 - Fixes a small boundary issue in how word frequency categories were calculated. Thanks mkmoisen!
v2.1.5 - Better type checking in dictionarySearch function that could cause bugs
@@ -147,7 +147,7 @@ function dictionarySearch(character, type) {
}

//If there's nothing to be found, then try and look for traditional entries.
if (search == '') {
if (search.length == 0) {
for (word in dictionarytraditional) {
if (dictionarytraditional.hasOwnProperty(word)) {
if (word.search(re) != -1) {
@@ -3,7 +3,7 @@
"author": "Niel de la Rouviere",
"description":
"HanziJS is a Chinese character and NLP module for Chinese language processing for Node.js",
"version": "2.1.4",
"version": "2.1.5",
"license": "MIT",
"main": "index.js",
"repository": {

0 comments on commit 8b80e6d

Please sign in to comment.
You can’t perform that action at this time.