author | Oleksandr Gavenko <gavenkoa@gmail.com> |
Thu, 11 Sep 2014 19:57:44 +0300 | |
changeset 54 | 2c389325d13b |
parent 53 | ee53cd2cb69a |
child 55 | 8ba9dc89be87 |
--- 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]; }