From 30723f3375a09df8a11322c85e418d29f471be8b Mon Sep 17 00:00:00 2001 From: Robert Moss Date: Sun, 16 Aug 2020 20:42:18 -0700 Subject: [PATCH] Removed use of `hasproperty` for Julia 1.0 compatibility --- src/PGFPlots.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PGFPlots.jl b/src/PGFPlots.jl index 27df0ed..313a63c 100644 --- a/src/PGFPlots.jl +++ b/src/PGFPlots.jl @@ -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)