Merge pull request #928 from mvj3/master

Fix   Cannot read property 'env' of null
This commit is contained in:
Harutyun Amirjanyan 2012-09-11 00:16:39 -07:00
commit c44c0137d5

View file

@ -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)