Skip to content

Commit 345f4d5

Browse files
committed
Fixes #14
1 parent 90bfba4 commit 345f4d5

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/genedataview.jl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,12 @@ function Base.getproperty(gv::GeneDataView{G}, name::Symbol) where {G <: Abstrac
1919
end
2020

2121

22-
function Base.getproperty(genes::AbstractArray{G, 1}, name::Symbol) where {G <: AbstractGene}
23-
GeneDataView(parent.(genes), index.(genes), name)
22+
function Base.getproperty(genes::G, name::Symbol) where {G <: AbstractVector{Gene}}
23+
if name in fieldnames(G)
24+
getfield(genes, name)
25+
else
26+
GeneDataView(parent.(genes), index.(genes), name)
27+
end
2428
end
2529

2630

0 commit comments

Comments
 (0)