visionmedia/express — pull request #1581 by IlskenLabs (2013-04-16 05:03:18+00:00)
Title: SugarJS Compatibility

Express 3.0 currently breaks if you use SugarJS with it's `Object.extend();` feature.
The problem occurs in `router/index.js`

`(this.map[method] = this.map[method] || []).push(route);`

Because `merge` is a method supported by express and a function added to the Object prototype by Sugar, `this.map[method]` is mistakenly assigned the merge function from the prototype instead of the empty array.

Fix:
Use hasOwnProperty to check if the method exists, to fix mixups caused by merge function added to the Object prototype by Sugar