Fix "Cannot read property 'value' of undefined" bug.

This happened when you hit enter on an input without being in customOption mode. This was not a regression, but a pre-existing bug.