Handles cases when search_field[0] is undefined

In some cases search_field[0] is undefined and call to @search_field[0].disabled causes javascript error. This makes sure it is defined so we don't get the error.