Skip to content

Commit a3d7b6d

Browse files
committed
use hasproperty, not hasfield for ProjectTo
1 parent d68a5b8 commit a3d7b6d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "ChainRulesCore"
22
uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
3-
version = "1.0.0"
3+
version = "1.0.1"
44

55
[deps]
66
Compat = "34da2185-b29b-5c13-b0c7-acf172513d20"

src/projection.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ function (project::ProjectTo{AbstractArray})(dx::AbstractArray{S,M}) where {S,M}
183183
end
184184
# Then deal with the elements. One projector if AbstractArray{<:Number},
185185
# or one per element for arrays of anything else, including arrays of arrays:
186-
dz = if hasfield(typeof(backing(project)), :element)
186+
dz = if hasproperty(project, :element)
187187
T = project_type(project.element)
188188
S <: T ? dy : map(project.element, dy)
189189
else

0 commit comments

Comments
 (0)