Actually fix "Cannot read property env of null"

This commit is contained in:
nightwing 2012-10-26 21:49:53 +04:00
commit 4959e121c8

View file

@ -66,9 +66,8 @@ exports.config = require("./config");
exports.edit = function(el) {
if (typeof(el) == "string") {
var _id = el;
if (!(el = document.getElementById(el))) {
console.log("can't match div #" + _id);
}
if (!(el = document.getElementById(el)))
throw "ace.edit can't find div #" + _id;
}
if (el.env && el.env.editor instanceof Editor)