Commits

masklinn  committed 5adb2d9

Fix stupid bug in constructor __call__ arguments forwarding

  • Participants
  • Parent commits 0d48da9

Comments (0)

Files changed (1)

                 proto[k] = dict[k];
             }
         }
-        constructor.__call__ = function (args) {
+        constructor.__call__ = function () {
             // create equivalent type with same prototype
             var instance = create(proto);
             // call actual constructor
-            var res = constructor.apply(instance, args);
+            var res = constructor.apply(instance, arguments);
             // return result of constructor if any, otherwise instance
             return res || instance;
         };