diff --git a/crates/haku/src/trampoline.rs b/crates/haku/src/trampoline.rs index 27e8aca..ab44392 100644 --- a/crates/haku/src/trampoline.rs +++ b/crates/haku/src/trampoline.rs @@ -73,6 +73,12 @@ impl Trampoline { let value = vm.run(system, draw_id, &[Value::Ref(dotter)])?; self.value = value; + // Prevent event handling weirdness on the frontend by disallowing continuing dotters + // with anything but scribbles. + if self.cont(vm) != Cont::Scribble { + return Err(vm.create_exception("a dotter must be continued with a scribble")); + } + Ok(()) } }