Fix Issue TRUNK-2968. Javascript error in auto complete selection.

fix Javascript error in auto completes when the user makes an invalid selection