Merge pull request #2611 from daschw/default

Fix `default()`
This commit is contained in:
Daniel Schwabeneder 2020-04-22 19:01:24 +02:00 committed by GitHub
commit c428dcdb3e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -681,10 +681,14 @@ function default(k::Symbol, v)
end
function default(; kw...)
kw = KW(kw)
RecipesPipeline.preprocess_attributes!(kw)
for (k,v) in kw
default(k, v)
if isempty(kw)
reset_defaults()
else
kw = KW(kw)
RecipesPipeline.preprocess_attributes!(kw)
for (k,v) in kw
default(k, v)
end
end
end