Fix javascript error when codemirror is disabled
Merge pull request #570 from gtoniser/master

Fix javascript error when codemirror is disabled