Skip to content

Commit f21c4cf

Browse files
committed
Plug performance hole
1 parent 69624ce commit f21c4cf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/base.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ function tree_mapreduce(
9898
preserve_sharing &&
9999
throw(ArgumentError("Need to specify `result_type` if you use `preserve_sharing`."))
100100

101-
if preserve_sharing
101+
if preserve_sharing && RT != Nothing
102102
return @with_memoize inner(inner, tree) IdDict{N,RT}()
103103
else
104104
return inner(inner, tree)

0 commit comments

Comments
 (0)