Browse files

Resig-style constructor

  • Loading branch information...
1 parent c1ab71c commit 4db0a3dbecd0ef4b2250101509dd274e2e4db1f2 @1602 committed Dec 22, 2011
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/railway_routes.js
View
1 lib/railway_routes.js
@@ -3,6 +3,7 @@ var singularize = require('./inflection').singularize;
exports.Map = Map;
function Map(app, bridge) {
+ if (!(this instanceof Map)) return new Map(app, bridge);
this.app = app;
this.bridge = bridge;
this.paths = [];

0 comments on commit 4db0a3d

Please sign in to comment.