diff --git a/crates/rand/src/global/pick.rs b/crates/rand/src/global/pick.rs index 6e9ca53..d2fe38c 100644 --- a/crates/rand/src/global/pick.rs +++ b/crates/rand/src/global/pick.rs @@ -23,7 +23,7 @@ pub fn pick(options: ByondValue, secure: Option) -> ByondResult) -> ByondResult> { - if options.length::()? < 1 { + if !options.is_list() || options.length::()? < 1 { return Ok(None); } let options = options.read_assoc_list()?;