It was using Backbone.Router.extend
as the constructor (with the parentheses going as arguments to the constructor, not the result of the Backbone.Router.extend
call (where the call to Backbone.Router.extend
returns a function to be used as a constructor). For example, compare:
function Test()
{ return function () { this.a = 2; };
}
console.log(new Test()); // function () { this.a = 2; }
console.log(new (Test())); // { a: 2 }