mirror of
https://github.com/storytold/deckcraft.git
synced 2026-10-29 04:56:58 -06:00
Keep auto-advance when transition.timing gets an invalid after
Found while testing crates/engine/src/cmd/transition.rs:112-115 (timing) Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com> Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Haiku 5.5
parent
a0eeb341d2
commit
8a730912c2
@@ -111,7 +111,11 @@ fn timing(s: &mut Session, p: &Value) -> Result<Value> {
|
||||
}
|
||||
match p.get("after") {
|
||||
Some(Value::Null) => t.advance_after_ms = None,
|
||||
Some(v) => t.advance_after_ms = v.as_u64().map(|x| x.min(86_400_000) as u32),
|
||||
Some(v) => {
|
||||
if let Some(x) = v.as_u64() {
|
||||
t.advance_after_ms = Some(x.min(86_400_000) as u32);
|
||||
}
|
||||
}
|
||||
None => {}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user