Fix Cannot read property env of null
This commit is contained in:
parent
86750fbadb
commit
f9481eeb19
1 changed files with 4 additions and 1 deletions
|
|
@ -65,7 +65,10 @@ exports.config = require("./config");
|
|||
**/
|
||||
exports.edit = function(el) {
|
||||
if (typeof(el) == "string") {
|
||||
el = document.getElementById(el);
|
||||
var _id = el;
|
||||
if (!(el = document.getElementById(el))) {
|
||||
console.log("can't match div #" + _id);
|
||||
}
|
||||
}
|
||||
|
||||
if (el.env && el.env.editor instanceof Editor)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue