harthur / classifier

Bayesian classifier with Redis backend
MIT License
624 stars 65 forks source link

Reset category list to empty only initially. #4

Closed stesie closed 11 years ago

stesie commented 11 years ago

Hey there,

the localStorage backend currently always resets the category list to {} upon initialization. That way however you can't just start classifying after instantiation, since the list is empty.

I've wrapped the statement with an if-clause. Firefox returns null for unset keys and Chrome undefined, therefore I just test it to evaluate to false.

How to regenerate classifier.min.js? I didn't find a npm target or so. For the moment I've patched the minified version, but that's just painful :-)

cheers, stesie

harthur commented 11 years ago

Thanks! I either use browserify or browserbuild to build the browser file out of an npm package. I'll build a new one soon.