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

ReferenceError: isPlainObject is not defined #31

Closed
jonaswindey opened this issue Jun 10, 2015 · 5 comments
Closed

ReferenceError: isPlainObject is not defined #31

jonaswindey opened this issue Jun 10, 2015 · 5 comments

Comments

@jonaswindey
Copy link

I have a very strange bug on Chrome which throws this error when my development tools aren't open.

I'm using webpack + react + counterpart (which requires this module).

The weird thing is that when I open my development tools, the method isPlainObject is clearly defined, but not when it's closed.

On Safari/FF everything works. It seems like a scope issue when requiring this module via webpack that isPlainObject should be called like _this.isPlainObject and exposing this as _this in the top of the index.js.

Any suggestions?

@ljharb
Copy link
Collaborator

ljharb commented Jun 10, 2015

I'm not really sure as I use browserify instead of webpack. Could you provide a gist of the relevant post-webpack code? "this" should be undefined (or the global object) in any IIFE, which all commonJS modules are wrapped in, so I wouldn't expect to, nor accept, using "this" anywhere.

@delacruz-dev
Copy link

@jonaswindey hey, I'm having exactly the same issue here. Did you find any workaround or solution?

@jonaswindey
Copy link
Author

@danderu no, I finally used react-intl which doesn't rely on counterpart. Let me know if you find a workaround though.

@damienleroux
Copy link

I had the same problem (using React, mobersvable-react & extend). I finally found out that it was my version of extend that was not up to date. I used 2.0 instead of 3.0. Hope it can help others

@ljharb
Copy link
Collaborator

ljharb commented Oct 28, 2015

I'm going to close this unless a reproducible test case can be provided.

@ljharb ljharb closed this as completed Oct 28, 2015
This issue was closed.
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

4 participants