mirror of
https://github.com/duke-git/lancet.git
synced 2026-02-23 13:52:26 +08:00
fix the bug in cloning slices (#129)
* test: add test cases for cloning slices. * fix: fix the bug in cloning slices.
This commit is contained in:
@@ -99,7 +99,7 @@ func (c *cloner) cloneArray(v reflect.Value) reflect.Value {
|
||||
for i := 0; i < v.Len(); i++ {
|
||||
val := c.clone(v.Index(i))
|
||||
|
||||
if val.IsValid() {
|
||||
if !val.IsValid() {
|
||||
continue
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user