Don't freak out when backspacing a value then deleting the whole tag
[potlatch2.git] / net / systemeD / controls / AutoComplete.as
index 527b80490d790922535c97dbd4e9b8d2263d57cc..833e6274034898ce8772956998a1922b96d947dc 100644 (file)
@@ -355,6 +355,7 @@ package net.systemeD.controls {
                }
                                
                private function defaultFilterFunction(element:*, text:String):Boolean {
+                       if (!text || text=='') return false;
                        var label:String = itemToLabel(element);
                        return (label.toLowerCase().substring(0,text.length) == text.toLowerCase());
                }