Skip to content

Commit

Permalink
Removed use of hasproperty for Julia 1.0 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
mossr committed Aug 17, 2020
1 parent 91e6e7a commit 30723f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/PGFPlots.jl
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@ function plotHelper(o::IO, axis::Axis)
end
println(o) # empty line between plots
end
legendentries = map(p->hasproperty(p, :legendentry) ? p.legendentry : nothing, axis.plots)
legendentries = map(p->:legendentry in propertynames(p) ? p.legendentry : nothing, axis.plots)
legendentries = vcat(legendentries...) # flatten
# avoid adding \legend altogether if all entries are `nothing`
if !all(legendentries .=== nothing)
Expand Down

0 comments on commit 30723f3

Please sign in to comment.