Actually fix "Cannot read property env of null"
This commit is contained in:
parent
bd24fad28f
commit
4959e121c8
1 changed files with 2 additions and 3 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue