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

Error when changing values in array #6

Closed
Phanabani opened this issue Jan 22, 2018 · 4 comments
Closed

Error when changing values in array #6

Phanabani opened this issue Jan 22, 2018 · 4 comments
Assignees
Labels

Comments

@Phanabani
Copy link
Collaborator

Phanabani commented Jan 22, 2018

Hello! I love your module, and I've been using it all weekend. I just found out that when I try to directly change a value in an array, I get an error: TypeError: handleUpdateValue(...) is undefined. This originates from line 178 in ./components/JsonValue.js. This causes the value to change (onDeltaUpdate gets called, but not beforeUpdateAction), but the input box doesn't close. I tried it in Firefox on Linux, and Chrome on Windows (using your demo website) and got the same error each time.

One thing that might help is that if there is an object inside an array, I can edit that object's properties without this error occurring. Only values directly inside the array seem to cause it.

@oxyno-zeta oxyno-zeta self-assigned this Jan 22, 2018
@oxyno-zeta oxyno-zeta added the bug label Jan 22, 2018
@oxyno-zeta
Copy link
Owner

oxyno-zeta commented Jan 22, 2018

Hello !

Thanks to use this library :).
I see the bug on the demo page. I will fix this this night (I can't for the moment...).

EDIT: The problem is on wrong promise management... My fault. I will fix this.

Oxyno-zeta

oxyno-zeta added a commit that referenced this issue Jan 22, 2018
@oxyno-zeta
Copy link
Owner

I've just released the 2.1.0 version.
This version should fix the bug. I've also added a new feature to log errors on promises.

Can you tell me if it is ok ?

@Phanabani
Copy link
Collaborator Author

Yes, it's working well now! Thanks a lot for your help and the excellent library. I'll let you know if I happen to find any other bugs.

@oxyno-zeta
Copy link
Owner

oxyno-zeta commented Jan 23, 2018

That's a good news !
You are welcome.
Thanks for using library and to create these bugs. This improve library :-). Don't hesitate !

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

No branches or pull requests

2 participants