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

babel-plugin-redux-saga crashes sagas - Object.defineProperty called on non-object #2088

Open
ChrisWiles opened this issue Jun 27, 2020 · 1 comment

Comments

@ChrisWiles
Copy link

Steps to reproduce

yield something that isn't an object.

Description of the bug/issue

The plugin should check that that it transforming an object before calling defineProperty.

TypeError: Object.defineProperty called on non-object

Example

// I know there is nothing to yield here, but this would normaly be fine without the plugin 
function* foo() {
  yield 20; //  crash: Object.defineProperty called on non-object
}
@Andarist
Copy link
Member

Andarist commented Jul 2, 2020

Thanks for the report - it's definitely something that we should fix. Not sure though when this will happen, unless you would like to help to implement a fix for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants