From 4959e121c8edd6aab7757ec68e11169b4a86d3fa Mon Sep 17 00:00:00 2001 From: nightwing Date: Fri, 26 Oct 2012 21:49:53 +0400 Subject: [PATCH] Actually fix "Cannot read property env of null" --- lib/ace/ace.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/ace/ace.js b/lib/ace/ace.js index f0e7f50b..b40ab454 100644 --- a/lib/ace/ace.js +++ b/lib/ace/ace.js @@ -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)