Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should correct handle names of built-in Object properties #1

Closed
ikokostya opened this issue Apr 26, 2013 · 0 comments
Closed

Should correct handle names of built-in Object properties #1

ikokostya opened this issue Apr 26, 2013 · 0 comments

Comments

@ikokostya
Copy link

var router = require('rou')();

router.when('/').then(function(){});

router.route({
    path: '/',
    query: {hasOwnProperty: 1}
});
$ node test.js 

/home/kostya/node_modules/rou/lib/rule.js:86
                queryParams.hasOwnProperty(j) && (res[j] = queryParams[j]);
                            ^
TypeError: Property 'hasOwnProperty' of object #<Object> is not a function
    at Object.Rule._mergeParams (/home/kostya/node_modules/rou/lib/rule.js:86:29)
    at Object.Rule._match (/home/kostya/node_modules/rou/lib/rule.js:64:26)
    at Object.Router._doRouting (/home/kostya/node_modules/rou/lib/router.js:75:40)
    at Object.Router.route (/home/kostya/node_modules/rou/lib/router.js:47:44)
    at Object.<anonymous> (/home/kostya/test/test.js:5:8)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant