Skip to content

Commit ca276f7

Browse files
committed
Fix copy on MissingVector
1 parent 7365959 commit ca276f7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/JSONTables.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Base.IndexStyle(::Type{<:MissingVector}) = Base.IndexLinear()
3131
# Base.length(x::MissingVector) = length(x.x)
3232
Base.size(x::MissingVector) = size(x.x)
3333
@inline Base.getindex(x::MissingVector, i::Int) = miss(x.x[i])
34-
Base.copy(x::MissingVector) = map(y->miss(copy(y)), x)
34+
Base.copy(x::MissingVector) = map(y->y isa JSON3.Object || y isa JSON3.Array ? copy(y) : miss(y), x)
3535

3636
Base.propertynames(x::Table{true}) = Tuple(keys(getfield(x, :source)))
3737
Base.getproperty(x::Table{true}, nm::Symbol) = MissingVector(getproperty(getfield(x, :source), nm))

0 commit comments

Comments
 (0)