Skip to content

Commit fbc7f71

Browse files
committed
fix bug in multiple callback setter
1 parent 71dbbb6 commit fbc7f71

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/metadata.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ Sets the callback function for the component. Overwrites any existing callback.
393393
See also [`add_callback!`](@ref).
394394
"""
395395
function set_callback!(c::ComponentModel, cb; check=true)
396-
if !(cb isa ComponentCallback) && !(cb isa NTuple{N, <:ComponentCallback} where N)
396+
if !(cb isa ComponentCallback) && !(cb isa Tuple && all(c -> c isa ComponentCallback, cb))
397397
throw(ArgumentError("Callback must be a ComponentCallback or a tuple of ComponentCallbacks, got $(typeof(cb))."))
398398
end
399399
check && assert_cb_compat(c, cb)

0 commit comments

Comments
 (0)