flatiron / director

a tiny and isomorphic URL router for JavaScript
http://github.com/flatiron/director
MIT License
5.6k stars 486 forks source link

this.extend is not a function #320

Closed sekoyo closed 9 years ago

sekoyo commented 9 years ago

Hi, when calling director.http.Router(routes) with Node v4.2.1 with the --es_staging flag I am getting:

/.../node_modules/director/lib/director/http/index.js:33 this.extend(exports.methods.concat(['before', 'after'])); ^

TypeError: this.extend is not a function

Sure enough there is no definition of extend on that Router function. Where is it supposed to be coming from?

sekoyo commented 9 years ago

I was missing the new keyword