Skip to content
Myr

Improve deprecation message for router.param()

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Douglas Christopher Wilson · committed by Douglas Christopher Wilson · parent 4db51fb · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:lib/router/index.js+1 added-1 removed
93 unmodified lines
94 var len = params.length;95 var ret;9697 if (name[0] === ':') {98 deprecate('name with leading colon: remove leading colon from ' + JSON.stringify(name));98 deprecate('router.param(' + JSON.stringify(name) + ', fn): Use router.param(' + JSON.stringify(name.substr(1)) + ', fn) instead');99 name = name.substr(1);100 }101102 for (var i = 0; i < len; ++i) {
527 unmodified lines