Skip to content

Cannot read property 'name' of undefined #1936

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

Closed
misund opened this issue Aug 14, 2018 · 1 comment
Closed

Cannot read property 'name' of undefined #1936

misund opened this issue Aug 14, 2018 · 1 comment

Comments

@misund
Copy link

misund commented Aug 14, 2018

Getting the error Cannot read property 'name' of undefined after upgrade from 7.9.1 to 7.11.0.

Example of source code that will trigger the crash:

import React from 'react';
import propTypes from 'prop-types';

const Foo = ({ bar, children }) => <div className={bar}>{children}</div>;
const Baz = ({...rest})=> <Foo {...rest}>Baz</Foo>;

Foo.propTypes = {
	bar: propTypes.string,
};
Baz.propTypes = Foo.propTypes;

export {
	Foo,
	Baz,
};

Baz.propTypes = Foo.propTypes; seems to be the trigger.

@ljharb
Copy link
Member

ljharb commented Aug 14, 2018

Duplicate of #1928.

@ljharb ljharb closed this as completed Aug 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants