Skip to content

Commit

Permalink
Avoid rendering <a> element
Browse files Browse the repository at this point in the history
This has caused many issues, when an <a> element is created in this component there will be no way to support links, as nested <a> elements is offensive in the eyes of HTML.

Closes mui#2178, mui#1979, mui#1823
  • Loading branch information
alitaheri committed Dec 29, 2015
1 parent 9d654b1 commit 9db8d54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/enhanced-button.jsx
Expand Up @@ -197,7 +197,7 @@ const EnhancedButton = React.createClass({

return React.isValidElement(containerElement) ?
React.cloneElement(containerElement, buttonProps, buttonChildren) :
React.createElement(linkButton ? 'a' : containerElement, buttonProps, buttonChildren);
React.createElement(linkButton ? 'span' : containerElement, buttonProps, buttonChildren);

},

Expand Down

0 comments on commit 9db8d54

Please sign in to comment.