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

fix: array writes #454

Merged
merged 1 commit into from
Nov 26, 2022
Merged

fix: array writes #454

merged 1 commit into from
Nov 26, 2022

Conversation

stevenh
Copy link
Collaborator

@stevenh stevenh commented Nov 26, 2022

Fix array writes not being persisted by passing in writeable reflect.Value when available instead of .Interface() which looses that property.

Also:

  • Use value.IsValid() instead of comparison with zero entry.
  • Use propertyLength instead of literal.

Fixes #386

@stevenh stevenh marked this pull request as draft November 26, 2022 00:56
@stevenh stevenh marked this pull request as ready for review November 26, 2022 02:55
Fix array writes not being persisted by passing in writeable
reflect.Value when available instead of .Interface() which looses that
property.

Also:
* Use value.IsValid() instead of comparison with zero entry.
* Use propertyLength instead of literal.

Fixes #386
@stevenh stevenh merged commit 08e7a8d into master Nov 26, 2022
@stevenh stevenh deleted the fix/array-set branch November 26, 2022 02:57
sg3des pushed a commit to sg3des/otto that referenced this pull request Jul 17, 2023
Fix array writes not being persisted by passing in writeable
reflect.Value when available instead of .Interface() which looses that
property.

Also:
* Use value.IsValid() instead of comparison with zero entry.
* Use propertyLength instead of literal.

Fixes robertkrimen#386
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

Successfully merging this pull request may close these issues.

JS Array inside Struct don't set the value inside of the otto.VM
1 participant