Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

Looping over empty Array cases crash in IE #6

Open
lapponiandevil opened this issue Dec 8, 2015 · 5 comments
Open

Looping over empty Array cases crash in IE #6

lapponiandevil opened this issue Dec 8, 2015 · 5 comments
Labels

Comments

@lapponiandevil
Copy link

For loop over empty array causes application to crash in IE 11, win8.1.
http://stackoverflow.com/questions/500504/why-is-using-for-in-with-array-iteration-such-a-bad-idea

screen shot 2015-12-08 at 17 18 14

@lapponiandevil
Copy link
Author

I see now that you already have IE issue in the TODO list.
How is the build procedure here? I'm quite new to npm and webpack, which makes it a bit confusing for me to make a PR.

@ismaelga
Copy link
Owner

ismaelga commented Dec 8, 2015

Yes, this is same issue I have on my TODO. I've been delaying it but if there are people out there that requires it I will make sure I do it in the next few days. But I would gladly accept a PR from you if are willing to send one.

Uh! I guess we need some instructions for contributions. I will add that to the TODO list.
Meanwhile here are some instructions:

1. Install dependencies with
npm install
2. Do your changes
3. Test it manually because we don't have any automatic tests 😞
3.1. Build the demo page for a quick test. (This will use your local working copy of the package)
npm run gh-pages

Open ./gh-pages/index.html in your browser and do your testing

3.2. Alternatively if you want to make a build to import in your own project
npm run dist

Then in your project do npm install /path/to/local-react-json-editor --save. An you will have your changed react-json-editor in your project for testing.

4. When your happy with your changes submit a PR. Please don't send any changes to ./dist.

It would be awesome if some one submitted a PR with a better guides then this to a CONTRIBUTING.md file ❤️

@haf
Copy link

haf commented Dec 26, 2015

Your guide doesn't quite work. When running npm run gh-pages:

npm run gh-pages

> react-json-editor@0.2.0 gh-pages /Users/h/dev/react-json-editor
> webpack --config ./config/webpack.gh-pages.js

Hash: 4a59bf8af54c303e6b39
Version: webpack 1.12.9
Time: 1727ms
     Asset       Size  Chunks             Chunk Names
 bundle.js    66.8 kB       0  [emitted]  main
index.html  253 bytes          [emitted]
   [0] multi main 28 bytes {0} [built]
    + 20 hidden modules

ERROR in ./demos/index.js
Module not found: Error: Cannot resolve module 'react' in /Users/h/dev/react-json-editor/demos
 @ ./demos/index.js 11:12-28

ERROR in ./demos/app.js
Module not found: Error: Cannot resolve module 'react' in /Users/h/dev/react-json-editor/demos
 @ ./demos/app.js 3:12-28

ERROR in ./demos/demo.jsx
Module not found: Error: Cannot resolve module 'react' in /Users/h/dev/react-json-editor/demos
 @ ./demos/demo.jsx 3:12-28

ERROR in ./~/react-ghfork/dist/react-ghfork.js
Module not found: Error: Cannot resolve module 'react' in /Users/h/dev/react-json-editor/node_modules/react-ghfork/dist
 @ ./~/react-ghfork/dist/react-ghfork.js 3:27-43

ERROR in ./dist/react-json-editor.js
Module not found: Error: Cannot resolve module 'react' in /Users/h/dev/react-json-editor/dist
 @ ./dist/react-json-editor.js 3:27-43

@ismaelga
Copy link
Owner

@haf I know I'm a bit late, but did you found a way around it? Did npm install fix that error?

@ismaelga ismaelga added the bug label Jan 18, 2016
@haf
Copy link

haf commented Jan 18, 2016

Afraid I haven't been able to go any further with this after not getting into the environment properly.

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

No branches or pull requests

3 participants