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

Using propTypes.any throws an error when passing strings #9

Open
robert-cnvrg opened this issue Apr 20, 2020 · 0 comments
Open

Using propTypes.any throws an error when passing strings #9

robert-cnvrg opened this issue Apr 20, 2020 · 0 comments

Comments

@robert-cnvrg
Copy link

i have a small component that accepts an icon of various types:

export default { props: { icon: propTypes.any.isRequired, }, };

when passing a string to this component i get the following warning:
[Vue warn]: Invalid prop: type check failed for prop "icon". Expected , got String with value "/packs/media/assets/icon.svg".

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