Skip to content

Commit da27d69

Browse files
fix: do not distribute_shift inside Sample and Hold
1 parent aaf7c57 commit da27d69

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/structural_transformation/utils.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@ end
593593
function _distribute_shift(expr, shift)
594594
if iscall(expr)
595595
op = operation(expr)
596-
(op isa Pre || op isa Initial) && return expr
596+
(op isa Union{Pre, Initial, Sample, Hold}) && return expr
597597
args = arguments(expr)
598598

599599
if ModelingToolkit.isvariable(expr) && operation(expr) !== getindex

0 commit comments

Comments
 (0)