[PATCH] Core.extend() r1271

Core.extend does not correctly detect missing baseClass. I noticed this when I switched to developing with the svn trunk and incorrectly changed ExtrasApp.TabPane to Echo.TabPane.

Reproduce: var o = Core.extend(Echo.SomeInexistantClass, {foo: "bar"})

Patch:

--- Core.orig.js        2008-09-05 00:28:05.000000000 +0200
+++ Core.js     2008-09-05 00:28:15.000000000 +0200
@@ -99,7 +99,7 @@
         var definition = arguments.length == 1 ? arguments[0] : arguments[1];

         // Perform argument error checking.
-        if (baseClass) {
+        if (arguments.length == 2) {
             if (typeof(baseClass) != "function") {
                 throw new Error("Base class is not a function, cannot derive.");
             }

Btw, would you rather receive patches here, or in the bug tracking software ?

Kenn

tliebeck's picture

Thanks, fixed CoreJS 18 /

Thanks, fixed CoreJS 18 / Echo3 1273.

Bugtracker is better for reporting, use forum if need be to bring critical issues to attention though.