We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 71dbbb6 commit fbc7f71Copy full SHA for fbc7f71
src/metadata.jl
@@ -393,7 +393,7 @@ Sets the callback function for the component. Overwrites any existing callback.
393
See also [`add_callback!`](@ref).
394
"""
395
function set_callback!(c::ComponentModel, cb; check=true)
396
- if !(cb isa ComponentCallback) && !(cb isa NTuple{N, <:ComponentCallback} where N)
+ if !(cb isa ComponentCallback) && !(cb isa Tuple && all(c -> c isa ComponentCallback, cb))
397
throw(ArgumentError("Callback must be a ComponentCallback or a tuple of ComponentCallbacks, got $(typeof(cb))."))
398
end
399
check && assert_cb_compat(c, cb)
0 commit comments