ai.js
changeset 54 2c389325d13b
parent 53 ee53cd2cb69a
child 56 76d257640b7d
--- 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];
     }