Permalink
Browse files

Pass through return value of constructor when inheriting

  • Loading branch information...
1 parent a88efef commit ea564049aab4db74992ba90a6a42ad222eb4fd6b @bfirsh committed Apr 12, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 backbone.js
View
2 backbone.js
@@ -1392,7 +1392,7 @@
if (protoProps && protoProps.hasOwnProperty('constructor')) {
child = protoProps.constructor;
} else {
- child = function(){ parent.apply(this, arguments); };
+ child = function(){ return parent.apply(this, arguments); };
}
// Inherit class (static) properties from parent.

1 comment on commit ea56404

@tbranyen

Constructors don't have return values, the instance is the return value?

Please sign in to comment.