Skip to content

Commit c536593

Browse files
committed
Fix children constructor
1 parent e8ff535 commit c536593

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Equation.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,11 @@ include("base.jl")
190190
) where {T1,N<:AbstractExpressionNode}
191191
if children !== nothing
192192
@assert l === nothing && r === nothing
193-
return node_factory(N, T1, val, feature, op, children..., allocator)
193+
if length(children) == 1
194+
return node_factory(N, T1, val, feature, op, only(children), nothing, allocator)
195+
else
196+
return node_factory(N, T1, val, feature, op, children..., allocator)
197+
end
194198
end
195199
return node_factory(N, T1, val, feature, op, l, r, allocator)
196200
end

0 commit comments

Comments
 (0)