Mercurial > hip
changeset 15:21bb73c5d9e1
Tiny fix to make nouns never match the empty string, so you don't get that weird thing where your input is empty and it's suggesting a list of cities.
author | jonathandicarlo@jonathan-dicarlos-macbook-pro.local |
---|---|
date | Mon, 07 Jul 2008 13:00:19 -0700 |
parents | a26372118854 |
children | 70f3c0c7d7e1 5fce4c8f3ebd |
files | nounClasses.js |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/nounClasses.js Wed Jul 02 16:50:15 2008 -0700 +++ b/nounClasses.js Mon Jul 07 13:00:19 2008 -0700 @@ -18,6 +18,9 @@ suggest: function( fragment ) { // returns (ordered) array of suggestions + if (!fragment) { + return []; + } var suggestions = []; for ( var x in this._expectedWords ) { word = this._expectedWords[x];