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

Add reflect.Invalid check to diffSlice #25

Closed
adrian-sturm opened this issue Apr 6, 2020 · 1 comment
Closed

Add reflect.Invalid check to diffSlice #25

adrian-sturm opened this issue Apr 6, 2020 · 1 comment

Comments

@adrian-sturm
Copy link

Currently, when diffing a slice type and a nil value, the diff() method returns an error "types do not match".
Inspecting your code i found that the diffSlice() method is missing the part at the beginning where you check if a or b are of type reflect.Invalid and thus there is a CREATE/DELETE change happening here.
This should be fairly easy to fix though, as you can just copy that part of logic from any other diff-method.
Thanks in advance! :)

@purehyperbole
Copy link
Member

Hey, thanks for raising the issue. This should now be fixed on the master branch.

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

2 participants