diff -r ee53cd2cb69a -r 2c389325d13b ai.js --- a/ai.js Thu Sep 11 19:22:04 2014 +0300 +++ b/ai.js Thu Sep 11 19:57:44 2014 +0300 @@ -8,9 +8,9 @@ ai.copyObj = function(from, to) { if (to == null || typeof to !== "object") to = {}; - if (from == null || typeof obj !== "object") + if (from == null || typeof from !== "object") return to; - for (var attr in cfg) { + for (var attr in from) { if (from.hasOwnProperty(attr)) to[attr] = from[attr]; }