Permalink
Browse files

Merge branch 'master' of github.com:baryshev/ect

  • Loading branch information...
2 parents d8e26fb + 41cd25e commit c66332443aac196408917a746c488d3efaca0b3f @baryshev committed Mar 4, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/ect.js
View
@@ -54,7 +54,7 @@
read = function (file) {
if (Object.prototype.toString.call(ect.options.root) === '[object Object]') {
- var data = eval('(ect.options.root.' + file + ')');
+ var data = file.split('.').reduce(function (currentContext, key) { return currentContext[key]; }, ect.options.root);
if (Object.prototype.toString.call(data) === '[object String]') {
return data;
} else {

0 comments on commit c663324

Please sign in to comment.