Fix for hideSelectionFromResult

In multi select mode, the function `hideSelectionFromResult` was tested against `undefined` as a property and not as a function as it should. In single select mode, there is no need to check again `undefined` as the default behavior is to display the currently selected item.