@@ -177,17 +177,19 @@ function remake(
177177 if ! (f isa Union{AbstractSciMLOperator, split_function_f_wrapper (T)})
178178 f = split_function_f_wrapper (T){iip, spec}(f)
179179 end
180- # For SplitFunction
181- # we don't do the same thing as `g`, because for SDEs `g` is
182- # stored in the problem as well, whereas for Split ODEs etc
183- # f2 is a part of the function. Thus, if the user provides
184- # a SciMLFunction for `f` which contains `f2` we use that.
185- f2 = coalesce (f2, get (props, :f2 , missing ), func. f2)
186- if ! (f2 isa Union{AbstractSciMLOperator, split_function_f_wrapper (T)})
187- f2 = split_function_f_wrapper (T){iip, spec}(f2)
180+ if hasproperty (func, :f2 )
181+ # For SplitFunction
182+ # we don't do the same thing as `g`, because for SDEs `g` is
183+ # stored in the problem as well, whereas for Split ODEs etc
184+ # f2 is a part of the function. Thus, if the user provides
185+ # a SciMLFunction for `f` which contains `f2` we use that.
186+ f2 = coalesce (f2, get (props, :f2 , missing ), func. f2)
187+ if ! (f2 isa Union{AbstractSciMLOperator, split_function_f_wrapper (T)})
188+ f2 = split_function_f_wrapper (T){iip, spec}(f2)
189+ end
190+ props = @delete props. f2
191+ args = (args... , f2)
188192 end
189- props = @delete props. f2
190- args = (args... , f2)
191193 end
192194 if isdefined (func, :g )
193195 # For SDEs/SDDEs where `g` is not a keyword
0 commit comments