fieldnames(x) -> fieldnames(typeof(x))

This commit is contained in:
Michael Krabbe Borregaard 2018-08-11 11:24:45 +01:00
parent 340cd0a1fe
commit c2dc030fae
2 changed files with 2 additions and 2 deletions

View File

@ -270,7 +270,7 @@ function _hdf5plot_writecount(grp, n::Int) #Write directly to group
end
function _hdf5plot_gwritefields(grp, k::String, v)
grp = HDF5.g_create(grp, k)
for _k in fieldnames(v)
for _k in fieldnames(typeof(v))
_v = getfield(v, _k)
kstr = string(_k)
_hdf5plot_gwrite(grp, kstr, _v)

View File

@ -10,7 +10,7 @@ end
function _get_defaults(s::Symbol)
thm = PlotThemes._themes[s]
if :defaults in fieldnames(thm)
if :defaults in fieldnames(typeof(thm))
return thm.defaults
else # old PlotTheme type
defaults = KW(