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

UISrefActive throwing error about undefined class #31

Closed
consultwithmike opened this issue Mar 13, 2017 · 2 comments
Closed

UISrefActive throwing error about undefined class #31

consultwithmike opened this issue Mar 13, 2017 · 2 comments

Comments

@consultwithmike
Copy link

I have defined a UISrefActive component like the following, but it is throwing an error about an undefined value for class.

<UISrefActive class="active">
    <UISref to="home">
        <a>
            <span className="glyphicon glyphicon-dashboard" aria-hidden="true"></span> Dashboard
        </a>
    </UISref>
</UISrefActive>

The error in the Console is:

Warning: Failed prop type: The prop class is marked as required in UISrefActive, but its value is undefined... in UISrefActive

@elboman
Copy link
Member

elboman commented Mar 24, 2017

Hi,
I cannot find anything wrong with your code. Can you reproduce the error in a plunker/jsbin so I can take a deeper look?

@consultwithmike
Copy link
Author

I found the culprit. I was using the https://github.com/insin/babel-plugin-react-html-attrs plugin for the JSX transform in Webpack and that was changing class to className during build.

Won't be using that plugin again!

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

2 participants