Merge pull request #928 from mvj3/master
Fix Cannot read property 'env' of null
This commit is contained in:
commit
c44c0137d5
1 changed files with 4 additions and 1 deletions
|
|
@ -65,7 +65,10 @@ exports.config = require("./config");
|
||||||
**/
|
**/
|
||||||
exports.edit = function(el) {
|
exports.edit = function(el) {
|
||||||
if (typeof(el) == "string") {
|
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)
|
if (el.env && el.env.editor instanceof Editor)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue