fixed autocomplete in js panel to not prompt the list if it is empty