Shouldn't throw Ace Editor js error

To reproduce:
1. Select a database and select the "+ New View" option from the
dropdown on the All Documents item.
2. Click on "Databases" in the left sidebar.

Before, this caused a JS error to occur.

Nightwatch test added to confirm this fix.

Closes COUCHDB-2468