Fix javascript error when codemirror is disabled