Skip to content

Commit 546852a

Browse files
author
Pinhook
committed
fixes extendless extending in 2nd order classes
1 parent 63cda8a commit 546852a

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

class/class.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ steal.plugins("jquery").then(function( $ ) {
493493
if ( initializing ) return;
494494

495495
if ( this.constructor !== Class && arguments.length ) { //we are being called w/o new
496-
return this.extend.apply(this, arguments)
496+
return arguments.callee.extend.apply(arguments.callee, arguments)
497497
} else { //we are being called w/ new
498498
return this.Class.newInstance.apply(this.Class, arguments)
499499
}

class/test/qunit/class_test.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,4 +170,11 @@ test("Creating without extend", function(){
170170
}
171171
});
172172
new Bar().ok();
173+
174+
Bar("Foo",{
175+
dude : function(){
176+
ok(true, "dude called")
177+
}
178+
});
179+
new Foo().dude(true);
173180
})

0 commit comments

Comments
 (0)