Skip to content

Commit 7536d96

Browse files
committed
[fixed] warning on links w/o params
fixes #253
1 parent a85267a commit 7536d96

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

modules/components/Link.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,13 @@ var Link = React.createClass({
5757

5858
// TODO: Deprecate passing props as params in v1.0
5959
getUnreservedProps: function (props) {
60+
var props = withoutProperties(props, RESERVED_PROPS);
6061
warning(
61-
false,
62+
Object.keys(props).length === 0,
6263
'Passing props for params on <Link>s is deprecated, '+
6364
'please use the `params` property.'
6465
);
65-
return withoutProperties(props, RESERVED_PROPS);
66+
return props;
6667
},
6768

6869
/**

0 commit comments

Comments
 (0)